Grouping parent categories into sections
Grouping parent categories into sections
Grouping parent categories into sections
Your query explicitly excludes the current post with this: ‘post__not_in’ => array($post->ID), remove that and it will return the current post within the results.
wp_list_category only showing to logged in uers
Alright, I solved it: I queried the year and month of the page we’re on with: $year = get_query_var(‘year’); $monthnum = get_query_var(‘monthnum’); And then I added date parameters to each WP_Query: $col1 = new WP_Query( array( ‘year’ => $year, ‘monthnum’ => $monthnum, ‘posts_per_page’ => 1, ‘cat’ => 31 ) ); This allows me to split … Read more
you should try that with a custom Nav Walker. Here is a code example how it should work. I check if the menu item is a category link. If yes, there is another check -> category count.If the category don’t have any posts the link won’t be passed to the html output. class Menu_Category_Count extends … Read more
Backend – Categories and Menus conflicts
You could try $slidercategories_array = array(3,5,6,9,10,11,12,23,24,27); $in = implode( ‘,’, array_map( ‘absint’, $slidercategories_array ) ); global $wpdb; $sql = $wpdb->prepare( ‘SELECT tt.term_id, MAX(p.post_date) AS max_date FROM ‘ . $wpdb->term_taxonomy . ‘ AS tt ‘ . ‘ JOIN ‘ . $wpdb->term_relationships . ‘ AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id’ . ‘ LEFT JOIN ‘ . $wpdb->posts … Read more
Some of your resources are not loading properly, even on your main domain. Using Google Chrome, load your main page, open the Elements Panel by hitting the F12 key. In the panel that opens, look in the upper right corner. There will be a red X with a number next to it. That shows you … Read more
I presume there is an open option html element before that code provided. After that select tag is opened and before you run through that loop echo out a blank option with value=””
I bet you have a page named “Blog” with a slug “blog” in your system too? You can’t have that with the permalink structure you have created because the permalink for this page would also be /blog/ and therefore cause a conflict. Try changing the slug of the page “blog” to something else.