remove tags from the_content

By default, WordPress adds paragraph tags to category descriptions. Stop this by adding the following to your functions.php file // Remove p tags from category description remove_filter(‘term_description’,’wpautop’); Simple and easy (codeless). Thank you

Remove the Homepage Query

The posts_request filter Skimming through the WP_Query we find this part of interest: if ( !$q[‘suppress_filters’] ) { /** * Filter the completed SQL query before sending. * * @since 2.0.0 * * @param array $request The complete SQL query. * @param WP_Query &$this The WP_Query instance (passed by reference). */ $this->request = apply_filters_ref_array( ‘posts_request’, … Read more

Do I need to use The Loop on pages?

According to the Theme Guide, full loops should be used, even on single templates. Full loops must be used in all templates. Just calling the_post() in a template like single.php or page.php is not enough. So yes, it’s a best practice to use full loops.

AJAX with loop filtering categories

I know this is old, this looks exactly what I need, but isn’t working ATM. I paste everything on functions.php for a reason. ONE: Category Loop for theme file: Printed it with a shortcode, because i’m using bakery I wan’t to put it in an specific place in the site. This is Working fine. <?php … Read more

How to split a loop into multiple columns

Create Columns for your query and easy display In themes is probably more useful to have something that fits well into template tags and the loop. My first answer didn’t focus on that much. Additionally I thought it’s a bit too complicated for a quick adoption. An easier approach that popped into my mind was … Read more