Page 2 has no posts?
Page 2 has no posts?
Page 2 has no posts?
Custom taxonomy return 404
Solution in my case: I created a custom query and prepended that query to the loop. E.g.: $args = array( ‘post_type’ => ‘services’ ); $services_query = new WP_Query( $args ); <?php if ( $services_query->have_posts() ) : ?> <?php while ( $services_query->have_posts() ) : ?> This ended up returning me the ID that I needed to … Read more
Unfortunately there is no way to nest wp_get_archives to achieve this, so you will have to build your own loop using get_month_link Like this (untested, regard this as a starting point): $year = 2009; while ($year =< get_the_time(‘Y’)) { echo ‘<ul>’ $month = 1; while ($month =< 12) { $link = get_month_link ($year, $month); if … Read more
Your rating plugin will not work on custom HTML content (e.g. those boxes). Why? Because where will it save the rating related data? It must save the data somewhere, right? Now, you don’t want to add the rating in any post, that’s fine. Your other option is to create a custom post type. You can … Read more
Have a look at the following .. function my_parse_request allows for the template to override. function my_query_vars adds your custom argument to the WordPress white listed args function my_init registers the rewrite. function find_custom_template finds your template in either a parent or child theme. remember you will need to flush() your permalinks for the rewrite. … Read more
Override the else part of the index.php loop.
WordPress has a helper function built into core, wp_trim_words(), that was added in v3.3.0. In your case, simply replace the_excerpt() with echo wp_trim_words( get_the_content(), 80 ); where 80 is the number of words you want.
You can use get_categories() to grab details about all of the categories that exist in the database – that way you know which IDs are active categories and which are not. Just so you are aware, by default, get_categories() will only return categories that contain at least 1 post. You can force empty categories to … Read more
You’re limiting your query via posts_per_page to five results, to get all possible results use -1. Don’t use $wp_query as variable name, as it is associated to a global variable with the same name, which can lead to interferences. But that said, you absolutely don’t need a custom query in your tag.php. You are already … Read more