Show all posts in category
to get the category slug of the category archive: $cat_slug = get_category(get_query_var(‘cat’))->slug; alternatively, to get the category ID of the category archive: $cat_id = get_query_var(‘cat’);
to get the category slug of the category archive: $cat_slug = get_category(get_query_var(‘cat’))->slug; alternatively, to get the category ID of the category archive: $cat_id = get_query_var(‘cat’);
You have a classic plugin for filtering on archive by category. Check out it and let’s see if it does what you want. Archives for category WP plugin
Check this out: http://css-tricks.com/snippets/wordpress/paginate-custom-post-types/ It is meant for custom post type, but I think it would work for you too. Edit: The important part about this link is the link was the use of the first lines before the loop: $temp = $wp_query; $wp_query = null; $wp_query = new WP_Query(); $wp_query->query(here goes the query); But … Read more
Since you’re a beginner I would like to mention that WordPress already has an archive widget. If ever it does not suit your needs, You can browse through the available archive plugins at wordpress.org and choose which one is the best for you.
check your reading settings. The number of post per page has to be the same in archives too.
In order for this kind of effect to work, the jquery plugin needs to ‘know’ which html tag to insert additional post into as child elements. The loading is done using Ajax calls. If you look at the JetPak Infinite Scroll plugin doc page, it instructs you how to achieve this. In order for it … Read more
You can use the pre_get_posts action to set posts_per_page to -1 on the monthly archive pages. I said wrongly in a comment to use is_archive() as your conditional. The problem with is_archive() is, it returns true on all archives, which includes category and taxonomy archive pages as well. I would suggest to make use of … Read more
If you can update your theme files, just update category.php and archive.php this way: <?php $counter = 0; while ($the_query->have_posts()) : $the_query->the_post(); ?> <?php if ($counter % 4 == 0) : ?> <div class=”my-ad”>my ad</div> <?php endif; ?> <div class=”post”> <?php the_title(); ?> </div> <?php $counter++; endwhile; You can also change archive/category template by your … Read more
Actually,this excerpt more with link settings automatically applies from your active theme. In order to fix this problem,Please add the below mentioned filter hook and callback function in your active child theme . function pp_custom_excerpt_length($length) { global $post; // Set content length only of process posts if ($post->post_type == ‘process_posts’ && !is_single()) { //change it … Read more
Reset your Permalinks (Dashboard > Settings > Permalinks). Just make a change, save and it should pick up your rewrite change. I’ve made this mistake a million times, you adjust a thing and forget this is needed.