What are all the available parameters for query_posts?

Below is everything from WordPress 3.0.1 found in the parse_query() function of /wp-includes/query.php (lines 1246-1550). However, it’s possible for a plugin to add parameters and so a list can never be fully complete: attachment attachment_id author author_name cat category__and category__in category__not_in category_name comments_popup day error feed hour m minute monthnum name order orderby p page_id … Read more

How can I allow the Editor Role to change Theme Settings?

you can add capabilities to the editor role using the role object and add_cap from you functions.php <?php // get the the role object $editor = get_role(‘editor’); // add $cap capability to this role object $editor->add_cap(‘edit_theme_options’); ?> you can also remove capabilities: $editor->remove_cap(‘delete_posts’); just take a look at the list of capabilities and what each … Read more

Disable plugin / plugin action via theme

When WordPress activates a plugin, it calls the activate_plugin() function. This function activates the plugin in a sandbox and redirects somewhere else on success. It’s been used by a few authors to programmatically activate plugin dependencies. There’s another function, deactivate_plugins(), that does a similar thing in reverse … it’s actually how WordPress deactivates plug-ins when … Read more

Where are Additional CSS files stored

It’s stored in the database, within the wp_posts table, under the custom_css post type, where the post name is the theme slug. There you also have the related customize_changeset and revision post types. The custom css post ID is also stored in the wp_options table under each theme mods, e.g. theme_mods_twentysixteen for Twenty Sixteen. It’s … Read more

if ( is_home() && ! is_front_page() )

This will display the title of the page when a static page is set to show posts. E.g. I show posts on my homepage… It’ll do nothing. If I, say, show posts on page titled News… It’ll show News in H1. This is used so that the title of the page is shown, whenever posts … Read more

Using OOP in themes

I can understand your confusion based on the example you provided. That’s really a poor way to use a class … and just because a class is used, doesn’t make a system OOP. In the case of Hybrid, they’re just using a class to namespace their functions. Considering Hybrid is a theme framework, this is … Read more