Articles of themes

What's the proper way to include inlined javascript-source?

I’m making a theme where I’m including a javascript-lib which wants to be loaded/instrumented with a potion of generated code at document.ready()-time. Generated because some theme-options are influencing the behaviour. I properly load the .js of the lib with wp_enqueue_script(). Now I need a proper way to put the the javascript-code below the script. I […]

How to Know if a Plugin can be used with my Theme

I am new to wordpress & I am using a paid theme on my site I want to know how I can identify if a plugin is good suit for my theme or not? I had to remove all the plugins on my site because it crashed the theme & I was not able […]

The proper way to include/require PHP files in WordPress

I’m a new WordPress developer and recently I’ve been having problems (on multiple sites) with include_once and require_once for PHP files. If I include (get_theme_directory_uri() . ‘subdir/file’) the specified file gets included (or required, which leads to fatal errors) but if any WordPress functions are called within ‘file’ I get something similar to: ‘Call to […]

Parallax WordPress theme without hardcoding – possible?

I want to develop my first Parallax WordPress theme, just for the fun of learning this stuff. I found this snippet: It lets the user click on a menu item and the website will scroll to that page. I want to know if it’s possible to do this when developing a theme – to […]

Set the transport of the Customizer 'header_image' core setting to 'postMessage'

To activate the Customizer core section Navigation (ID: nav), you need to: add_theme_support( ‘custom-header’ ); I already tried to make the transport of the Customizer header_image setting postMessage with the ID based on what I’m seeing at get_header_image(): function theme_customize_register( $wp_customize ) { $wp_customize->get_setting( ‘header_image’ )->transport = ‘postMessage’; // I also tried this line. // […]

Embedded Videos (PB) – Not Available

I am using this link to create a wordpress website VIDEO At minute 53 the guy is using “Embedded Videos (PB)” widget in order to embedd a youtube video. (By the way he is using Page Builder). Problem is – that widget is not available in the wordpress. Where can I find it, or is […]

Does theme update also update a child theme zip

Total wordpress beginner here. I purchased a organicfood theme and when I got an updated version for it, among other files I also found organicfood child theme zip in main directory. I know that contains the updated version of parent theme but I don’t know if same goes for organicfood child theme zip. Is […]

WordPress post arrangement using post_class

I want to create post layout in the following way: +——————–+ | 1 Full Width Post | +———-+———+ | 2 | 3 | +——————–+ | 4 Full Width Post | +———-+———+ | 5 | 6 | +———-+———+ So basically I want to use the post_class(). Say for full width it will be “full-width” class and […]

Unable to install theme recommended plugins on Multisite

I uploaded and activated the theme on my multisite network successfully. After this, I was trying to install the plugins that come bundled with the theme but when I clicked on install, it is showing this error. Here’s a small gif of the error

How to remove background image from post navigation elements?

I am using a theme which shows the featured image as background image in post navigation elements (next and previous links on a single post). But I want to remove these background images. Here is the actual code in template-tags.php file. function shoreditch_post_nav_background() { if ( ! is_single() ) { return; } $previous = ( […]