Custom taxonomy page template

You should follow appropriate naming convention (aka Template Hierarchy) of your templates to make your job done. If I’m clear about your query here then I’d suggest you to name your custom taxonomy archive template(s) as “taxonomy-{your-taxonomy-name-here}.php” (i.e. taxonomy-vegetable.php, taxonomy-fruit.php and so on) There must not be any blank space or underscore between two words … Read more

Remove posts_orderby filter then add it back in

To add back the filters that were removed you’d have to know what was hooked in originally in the first place. You could crawl the global $wp_filter array, but this should do the same at far less effort: function remove_query_order($order) { remove_filter(‘posts_orderby’,’remove_query_order’,PHP_INT_MAX); return ”; } add_filter(‘posts_orderby’,’remove_query_order’,PHP_INT_MAX); Add the filter before the query you want it … Read more

Modify WordPress loop after it has been run

First: Indent your code consistently, your code editor should do this automatically, if it doesn’t, you should change, I can recommend Sublime Text as a free option, but there are hundreds of others Don’t spam PHP tags, <?php echo ‘you’; ?><?php echo ‘ dont ‘; ?><?php echo ‘need ‘;?><?php echo ‘this’; ?>, when <?php echo … Read more

Post formating on Home page

Yes, it is quite simple, you just need to work in PHP. Consider you have 36 posts in a loop. $div_html_1 = ”; $div_html_2 = ”; $div_html_3 = ”; $div_html_4 = ”; $div_html_5 = ”; $div_html_6 = ”; if ( have_posts() ) { while ( have_posts() ) { if( category of post == division 1 … Read more