Custom Pagination based on Custom Post Type

I figured it out after reviewing the code reference for is_singular some more. Here is the final code: add_action( ‘genesis_entry_footer’, ‘dr_prev_next_post_nav’ ); function dr_prev_next_post_nav() { genesis_markup( array( ‘html5’ => ‘<div %s>’, ‘xhtml’ => ‘<div class=”navigation”>’, ‘context’ => ‘adjacent-entry-pagination’, ) ); if ( is_singular( array( ’employees’ ) ) ) { echo ‘<div class=”pagination-previous one-half first alignleft”>’; … Read more

How to make a shortcode for my WP_Query Loop? [duplicate]

I´m doing this since last year and i´m getting the shortcodes working: function my_code() { ob_start(); get_template_part(‘loop_logos’); return ob_get_clean(); } add_shortcode( ‘logos’, ‘my_code’ ); where get_template_part loads the file loop_logos.php and logos is the name shortcode [logos]. HINT When I started to do this I used to name all equal to avoid mistakes, Ex: function … Read more

Update Cateogory Taxonomy Count for Attachment Post Type

Have you tried with SQL? This one worked for me. UPDATE wp_term_taxonomy SET count = ( SELECT COUNT(*) FROM wp_term_relationships rel LEFT JOIN wp_posts po ON (po.ID = rel.object_id) WHERE rel.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id AND wp_term_taxonomy.taxonomy NOT IN (‘link_category’) AND po.post_status IN (‘publish’, ‘future’) )