WordPress Multisite: replace the parent theme

Site B is the child theme and has its own file to replace the screen option options. However, it is impossible to replace a part of the parent theme of site A which is the CUSTOM1 part. He can simply add a new metabox if it does not exist on site A (for example CUSTOM2)

plugins – Customizable list theme

I am creating a truck list site.
However, all the themes are for car lists and the fields for adding new lists are wrong. I must be able to modify these fields according to my site.

Can anyone recommend a theme or make themes allow you to edit these fields (if so how can i check)
Or should I just create my own list?
I don't want to buy a theme and it's no use to me.

theme development – Add additional elements to the_post in a custom post_type

I managed to create a custom publication type (I called it stores) to work in a loop, I plan to create a template with bootstrap so that all stores have the same design and have the ability to edit them all with the editor. .

What I need is a way to add additional items to the_post (items like the_title, the_content or the_time, but custom made, like "the_type" or " the_storetype ", etc.)

7 – Warning: illegal chain offset & # 39; theme_hook_original & # 39; in theme () (line 1094 of /var/www/html/includes/theme.inc)

We are trying to implement a theme function in a custom module in Drupal 7. our requirement is to display custom HTML output. we have inserted the code below in the "mymodule.module" file.

function mymodule_theme($existing, $type, $theme, $path) {
  $functions = array();
  $functions('mymodule_testview') = array(
    'arguments' => array('instruction' => NULL),
  );
  return $functions;
}


function theme_mymodule_testview($instruction) {
  $output = '
'; $output .= $instruction; $output .= '
'; return $output; } function mymodule_testview() { $instrutction = t('Some instructions.'); return theme('mymodule_testview', $instrutction); }

We can display the html output. But there is a warning message like "Warning: Illegal string offset 'theme_hook_original' in theme() (line 1094 of /var/www/html/includes/theme.inc)." displayed in the page.

We reinstalled the module and cleared the cache using Drush. But the warning still exists.

If other files need to be changed. Any help in solving this problem will be helpful. Thanks in advance.

Note: we tried the patch mentioned in https://www.drupal.org/project/ds/issues/2385835

in theme_mymodule_testview(). But the warning still exists.

theme development – Local variable name in setup_postdata ()

I'm new to wordpress, I was using the setup_postdata () method inside a template file which was called via the shortcode function. I have not used global $ post in my function.

if ( ! function_exists( 'new_shortcode' ) ) :
    function featured_posts_shortcode( $atts, $content = '' ) {
        ob_start();
        get_template_part("page-contents/section","abc");
        return ob_get_clean();   
    }
    add_shortcode( 'new', 'new_shortcode' );
endif;

Part of the code in the template file:

It does not work:

$my_post = get_post($my_post_id);
setup_postdata($my_post);        // Does not work.

Job:

$post = get_post($my_post_id);
setup_postdata($post);        // Works.

When I use setup_postdata ($ my_post), it doesn't set the global post on my post, but when I use setup_postdata ($ post), it sets the global post on my post.

How can a parameter name affect a function?
Can anyone explain why this is happening?

theme – Why use blocks, widgets and LESS when creating standard web pages?

why use blocks, widgets and LESS to create a web page when CRM supports standard web page building?

I'm trying to understand the overall logic and strategy for creating themes and content in the CMS and the front-end. I know little PHP and XML so my goal to use CRM. Sorry if it turns out a little confusing … hence my dilemma.

At this point, I'm not building anything deeper than a website from which I can sell.

  • I built my content in pages without blocks or widgets. Is it a security issue?
  • I am adding to LUMA with the feild, Head> Scripts and Style Sheets in the CMS backend.
  • I use categories for my navigation;

The site works very well!

So, after looking at Magento theme in Dev Docs the other day, I realized that maybe I was using Magento the wrong way.

I ask questions:

  • Why should I use blocks or widgets if I am not starting a business
    enter features for my website?

  • What are the advantages of blocks compared to the simple integration of HTML code in a page, besides deactivation and activation?

  • Why should I add to LUMA with a LESS document when all I have to do is write CSS externally, internally, online or via the CMS frontend via Content> DesignConfiguration> Head > Scripts and Style Sheets field? Is it a security issue?

  • Am I confusing the line between developing Magento2 and creating front-end Magento2 websites?

  • I work in PRODUCTION mode. Is there any reason for me to go into DEVELOPMENT mode since I'm building in CMS?

I know I have asked a lot of questions, but I have been about to use Magento for a year and I still have a lot to learn. At one point, I would like to be a Magento developer, but alas, I'm at the front door of Magento.

Any light you throw on my quest for the enlightenment of Magento2 is more than appreciated. Thank you in advance for your time and professional knowledge.-Starkemp. BTW: Thank you Prince for all of your previous help

8 – Impossible to define a default theme in a FunctionalJavascript test with the class property $ defaultTheme

Try several ways here to define a default theme to use in FunctionalJavascript tests and it doesn't work (I'm watching them run in the VNC viewer). Bartik is still showing.

I also tried to set $ defaultTheme to stark, it also does not appear. It's still Bartik. Depending on the class and documents, this is supported in Drupal 8.8.2.

How can I make my default theme and load it? Here is the class that my FunctionalJavascript class tests extend:

abstract class WebDriverTestBase extends CoreWebDriverTestBase {

  /**
   * {@inheritdoc}
   */
  protected $defaultTheme = 'MYTHEME';

  protected $profile = 'standard';

  /**
   * {@inheritdoc}
   */
  protected $strictConfigSchema = FALSE;

  /**
   * {@inheritdoc}
   */
  protected function setUp() {
    parent::setUp();
    $this->container->get('module_installer')->uninstall(('page_cache'));
    $this->container->get('theme_installer')->install(('MYTHEME'), TRUE);
    $this->container->get('config.factory')->getEditable('system.theme')->set('default', 'MYTHEME')->save();
  }

Edit: command being executed:

docker-compose exec --user=$DOCKER_COMPOSE_USER php phpunit --testsuite unit,kernel,functional,functional-javascript

My phpunit.xml.dist file limited these suites to my modules / custom folder.

Custom theme causes problem with Elementor preview

Your code:

the_post(); 

is definitely wrong (Oops, see below) – this WordPress function doesn't exist (as far as I know).

Delete this piece of code and it should work. Elementor hangs because the missing function in WordPress will cause an error.

My personal opinion on Elementor is pretty bad – inflated code and addiction to Elementor. They update something, your things crash

I recommend that you install the "Theme Check" plugin.

It will tell you what you are missing, it compares the theme code to WordPress guidelines and is very useful for sticking to WP coding standards.

the_content();

is correct with the loop in order to display the content.

EDIT:

Here is my loop:



    
    
> https://make.wordpress.org/themes/2014/06/28/correct-handling-of-static-front-page-and-custom-blog-posts-index-template/ $page_modus = get_option('show_on_front'); if($page_modus == 'page') { get_template_part('templates/loops/loop-front-page'); } else if($page_modus == 'posts') { get_template_part('templates/loops/loop-archive'); } // Normal Page } elseif(is_page()) { get_template_part('templates/loops/loop-page'); // Comment list if ( comments_open() || get_comments_number() ) { comments_template('/comments.php'); } // Get Commenty Reply Script if ( is_singular()){ wp_enqueue_script('comment-reply'); } // Category, Tags } elseif(is_category() || is_tag()) { get_template_part('templates/loops/loop-archive'); // Home, Archive } elseif(is_home() || is_archive()) { get_template_part('templates/loops/loop-archive'); // Search Result Page } elseif(is_search()) { get_template_part('templates/loops/loop-archive'); // Single Blog Post } elseif(is_single()) { get_template_part('templates/loops/loop-single'); $post_suggestions = wpbs4_get_theme_option('post_suggestions'); if($post_suggestions == 'on'){ get_template_part('templates/post-suggestions'); } // Comment list if ( comments_open() || get_comments_number() ) { comments_template('/comments.php'); } // Get Commenty Reply Script if ( is_singular()){ wp_enqueue_script('comment-reply'); } // Fallback } else { get_template_part('templates/loops/loop-page'); } ?>

This is the extract which is loaded according to the page

// template part "loop-page.php" (The other template parts look a bit different

So the simplified version of the above code would be:


    
        
        
>

Which theme is best for WordPress WooCommerce websites?

I have a WordPress Woocommerce site. I would like to change my Flatsome theme. I was wondering which theme was best for SEO and speed.

theme development – How to correctly queue scripts with ES6 webpack?

I am trying to create a page preloader.

It depends on the image loads and will show the percentage progress.

I use imagesLoaded and gsap plugins.

You can see the code here in codepen.

In codepen everything works perfectly, if you slow down your network,
you will see how the images are loaded in percentage.

And I tried to implement it for my wordpress theme:

function _themename_assets() {
    wp_enqueue_style( '_themename-stylesheet', get_template_directory_uri() . '/dist/assets/css/bundle.css', array(), '1.0.0', 'all' );
    wp_enqueue_script( '_themename-scripts', get_template_directory_uri() . '/dist/assets/js/bundle.js', array('jquery'), '1.0.0', true );
}
add_action('wp_enqueue_scripts', '_themename_assets');

And inside the js bundle, I import my plugins like this:

import $ from "jquery";
import { TweenMax, TimelineMax } from "gsap";
import imagesLoaded from 'imagesloaded';

then exactly the same code from my codepen,

in fact it works, but not as in codepen.

It looks like the scripts only work when the document is ready,

So it looks like: a black screen, waiting for all the documents to be loaded, then my script starts to work, but everything is loaded so that there is no pause, it just goes from 0 % to 100%, without any delay.

I'm new to WordPress and don't understand what I'm doing wrong?

I know this is a difficult question, especially in my explanation, so I will be happy to any advice.

Thanks in advance!