Category foreach Paging

I figured it out! After a lot of research and trial and error, I managed to figure out how to get the paging to work for both versions…my original code and the simplified code update. Original Code Solution: <?php $cat = get_cat_ID(“Photos”); $categories = get_categories(“child_of=$cat”); $limit = 9; $total = count($categories); $pages = ceil($total / … Read more

WordPress – registering sidebar and adding a button directly after .textwidget

Well as long as the buttons are all the same: if (function_exists(‘register_sidebar’)) { register_sidebar(array( ‘name’=> ‘Parallax Area’, ‘id’ => ‘parallax’, ‘before_widget’ => ‘<li class=”parallax-box”>’, ‘after_widget’ => ‘<button class=”btn-action”>Learn More…</button></li>’, ‘before_title’ => ‘<h2>’, ‘after_title’ => ‘</h2>’, )); } If the buttons were not all the same, you could make them be the same and specify the … Read more

Exclude Custom Post Type from shared Custom Taxonomy

You could try using the terms_clauses filter function wpse156370_terms_clauses( $pieces, $taxonomies, $args ) { global $wpdb; $pieces[‘fields’] .= $wpdb->prepare( ‘, (SELECT COUNT(*) FROM ‘ . $wpdb->posts . ‘ p, ‘ . $wpdb->term_relationships . ‘ p_tr’ . ‘ WHERE p_tr.object_id = p.ID AND p_tr.term_taxonomy_id = tt.term_taxonomy_id’ . ‘ AND p.post_status = %s AND p.post_type = %s) … Read more

How to exclude post from being queried based on custom meta value

According to the codex for WP_Query, you should be able to tack on some meta related arguments to your args array (this is untested): $review_args = array( ‘orderby’ => ‘post_date’, ‘order’ => ‘ASC’, ‘posts_per_page’ => ‘1’, ‘cat’ => 22, ‘meta_query’ => array( ‘key’=>’reviewed_by’, ‘value’=> $reviewed_by_array, ‘compare’=> ‘NOT IN’ ) ); $review_query = new WP_Query($review_args);