master.beta
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Hueman] Preserving needed z-index on sliderwhat about the advanced-post-slider.php?
Forum: Themes and Templates
In reply to: [Hueman] Preserving needed z-index on sliderHave a look at the responsive.css maybe?
Currently having a look on content.php and inc/featured.php
Hopefully can find something useful 😛The code from the page
<?php $my_query = new WP_Query( 'category_name=featured&posts_per_page=1' ); while ( $my_query->have_posts() ) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <!-- Do stuff... --> <?php endwhile; ?> <!-- Do other stuff... --> <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); if ( $post->ID == $do_not_duplicate ) continue; ?> <!-- Do stuff... --> <?php endwhile; endif; ?>But I reckon I still have to put the posts into a specific category (ie. “featured”) in order to exclude it from the second/third/forth loop?
Just for those who have the same problem and are willing to make it done manually every now and then
you can either
(1) create a featured category, assign the post to the category; and exclude the category in the custom loop withcat=-ID(in which ID = your featured category ID)
(2) give the posts a tag and exclude it withtag=-IDFrom that article
Thanks for the info. Worked well 🙂 Though, I’m encountering another issue for another site I’m currently doing. Is there a way to exclude from the loop only the latest post of a particular category?
Thing is, I’ve a blog that publishes podcasts. The front page highlights the most recent podcast – posts are published under category: Podcast – via its own styling. At the same time, the front page also shows the last 5 most recent posts, of which may include posts under the category “podcast”. I just don’t want to show in the loop the most recent post published under “Podcast” simply because it’s already featured with it’s own styling. Hope you can help me out. thanks!
You can exclude all posts from the category “postcast” from your loop if you want. But there is no simple way of excluding just the latest post.
probably got to dive into the codex page 🙁
Hi bdbrown thank you for your reply
using offset=N will exclude the N most recent post from the “custom loop”
(which is the category loop in my case)
instead of the N most recent post from the “main loop” of all the postswonder if there’s a way to exclude only the most recent ones of my whole site instead of the ones of the category 🙁
Cheers
Forum: Themes and Templates
In reply to: [Theme: Hueman] Set special excerpt length to featured posts?Kind of nailed it by
(1) adding a class in css
(2) changing the excerpt limit
(3) making use of ‘max-height’ to manually set limit for non-featured posts
(as i want 100 for featured and around 30 for non-featured)Don’t think this is the proper solution though
(having excerpts that can only be seen by viewing the page source lol)