Articles of theme development

A post with a clear:both in its css destroy the theme design, and the sidebar is moved to the bottom

Everything was working well, but somebody wrote a post with the following inside: <iframe blablabla (a video) </iframe> <div style=”clear: both; height: 3px; width: 592px;”></div> I think that clear: both was causing that the sidebar was being moved to the bottom as the following image displays: I added the following code to the css of […]

using Options Framework – can “theme-textdomain” domain be changed?

I’m using the Options Framework in a new theme. I would like to use the theme name as the domain for the localization functions such as __() and esc_attr(). But the localisation functions in the Options Framework source files have the domain set to ‘theme-textdomain’. I’d rather use the theme name as the domain. Is […]

Fatal error: Call to undefined function get_header()

Hello WordPress Developers, I got this erros messages when I check my site like below When I visite that url, it give me this message Fatal error: Call to undefined function get_header() in /users/my-username/www/mysite-folder/wp-content/themes/twentyfifteen/index.php on line 17 You know, the errors messages shouldn’t give us like that, Am I right? And I googled for […]

How do I include a partial from a directory below a wordpress theme directory?

I have 3 themes set up right now and I need them all to inherit partials from the same source in order to update all three themes at the exact same time when I change any of those partials. I’m seeing that include/require (../../../includes/vital/partial.php); doesn’t work from within single.php or any other other theme template […]

Is this an acceptable practice for WordPress theme development?

I don’t think this is the right way to do things, maybe I’m wrong or missing something but to me it seems unnecessary. Is this correct? What are the implications if any of doing things this way? In the functions file all the functions are wrapped in a class: class This_Theme { function example_fucntion( echo […]

add_theme_support using a plugin

I want to create a theme specific plugin for the opern-sourced Bootstrap Genesis theme where I can use the add_theme_support function to add or remove several mini plugins or theme modules/features that I have in a plugin subfolder. I found this question here, but could not figure it out based on the accepted answer. So […]

Is there a way to switch to another theme?

Is there a method that exists that will let me switch the theme? Update: It looks like switch_theme is the method and there is also an event of the same name. It says that it accepts an argument of stylesheet and for backwards compatibility it accepts, $themename and $stylesheet. I guess I don’t understand, why […]

Woocommerce Product attribute not imported with wordpress Importer

I used the WordPress Importer plugin and successfully imported all content but woocommerce product attributes are not imported. Tried a few different tests, and few different servers. Same result. Here is an example of an error received after attempting to import: Failed to import pa_color Blue Failed to import pa_color Brown Failed to import pa_size […]

Right procedure when you develop a WP Website for a client

i don’t know if this procedure could be incorrect while you develop a WP website for a client, but i worked like this for years: create a database and sub-domain on my server install WordPress and the relative template start to develop the website When everything is ok for the client export the Website (plus […]

How does the loop know which post to view?

I think I have understood most of how to create my own themes but this one thing: How can a loop in say page.php know which page to view when it loops through all the pages on my site? If I load one of my single pages (ex. contact form) how does page.php knows that […]