Blog Archives

Debugging WordPress With error_log()

If Debug logging is enabled, simply use the error_log() function and it will be written to /wp-content/debug.log . Refer this article to see how it can be done: Enable Debug Logging In WordPress You can also write the error_log to

Posted in WordPress Tagged with: , ,

Easy Tabbed Navigation With jQuery

Here is the HTML Markup <h4 class=”single-company-tab-wrapper hide-if-no-js”>   <a class=”single-company-tabs” href=”#info”>Info</a>   <a class=”single-company-tabs” href=”#contact”>Contact</a> </h4>   <div id=”info” class=”tab-content”>   <p>Content of info tab</p> </div>   <div id=”contact” class=”tab-content”>   <p>Content of contact tab</p> </div> And here is the jQuery jQuery( document

Posted in WordPress Tagged with: , , ,

Sort WordPress Posts With Multiple Criteria

This was a case on a project where a custom listing post type had post meta that specified if it was as platinum sponsor, or a gold sponsor or a verified profile. The job was to list the platinum sponsors

Posted in WordPress Tagged with: , , ,

Archive Page For Custom Taxonomy

Here is the Query. Highlighted content will have to be changed for your case. <?php $my_query = new WP_Query( array( ‘post_type’ => ‘company’, ‘tax_query’ => array(   array(     ‘taxonomy’ => ‘service’,     ‘field’ => ‘slug’,     ‘terms’ => get_query_var( ‘service’ ),   ), ),

Posted in WordPress Tagged with: , , ,

Fix WordPress Navigation -Same Posts On All Pages Problem

Add this to the custom query: ‘paged’ => get_query_var(‘paged’, 1) Refer: Query Anything On WordPress Anywhere

Posted in WordPress Tagged with: , ,