heronakamura
Forum Replies Created
-
excellent. Thank you very much indeed
hiya guys. just wondering if someone in the know can help me with this.
Many thanks.
Sorry mate. I thought it’s all perfect but I just realised, one of the child category (tips on dog care) did not show up. I have 3 child categories under parent category Dogs. namely hounds, terrier and tips on dog care.
This is how it shows with your code:
Category: Dogs
– Hounds (Child Category)
5 posts is shown
– Terrier (Child Category)
5 posts is shown
– Tips on Dog Care (Child Category) This is missingI’m assuming that the reason why it was dropped because there was no posts filed directly under Tips on Dog Care child category. This is how the posts are organised:
Dogs (Parent Category)
– Hounds (Child Category) – posts are filed under this child category
– Terrier (Child Category) – posts are filed under this child category
– Tips on Dog Care (Child Category) – there are no posts filed under this child category. Instead it is filed under Tips on Dog Care sub-vategory namely:
— Boarding Kennels (Sub-Category of Dog Tips Chld Category) – posts are here instead
— Dog Insurance (Sub-Category of Dog Tips Chld Category) – posts are here insteadIs there anyway to show it this way:
Category: Dogs
– Hounds (Child Category)
5 posts is shown
– Terrier (Child Category)
5 posts is shown
– Tips on Dog Care (Child Category) Show this
5 posts is shown. But pull it from all the Tips on Dog care sub-categoriescheers mate.
This worked as I wanted to. Many Thanks indeed. Appreciate it greatly. I spent weeks trying to figure it out with no luck.
You’re an ace keesiemeijer. Thaks again. Just like I said if you have a website, I’ll be happy to quote you if someone ask for this code.
We’re getting there mate.
Your code display it in this way:
This is the Dog Category Page
Category: Dogs
– Hounds (Child Category)
5 posts is shown
– Basset Hound (Grandchild Category)
5 posts is also shown
– Terrier (Child Category)
5 posts is shown
– Yorkshire Terrier (Grandchild Category)
5 posts is also shownHow can we exclude the Grandchild Category and its 5 posts?
I really appreciate it. Also, if you’re happy for me to quote you, can I have your website link, so I can quote you when someone needed this code. Many Thanks in advance.
To make it a bit more clear: Lets say I have an animal website with parent categories such as Dogs, Cats, Horses etc….
Your code display it in this way:
This is the Dog Category Page
Category: Cats
Category: Dogs
– Hounds (Child Category)
5 posts is shown
– Basset Hound (Grandchild Category)
5 posts is also shown
– Terrier (Child Category)
5 posts is shown
– Yorkshire Terrier (Grandchild Category)
5 posts is also shown
Category: HorsesHow can we exclude the cats and horses considering I’m on the dogs category page? Also, only display the child categories and 5 posts and not display the grandchild categories.
Many Thanks. I appreciate your hepl and patience greatly.
Sorry to confuse you. I have created separate category files for each of the parent categories. Like category-1.php etc…
On my Parent Category 1 Page, your code shows this:
Category: Parent Category 1 (http://example.com/category/parent-category-1/)
— Sub Category 1
5 posts is shown
— Sub Category 2
5 posts is shown
— Sub Category 3
5 posts is shownBut it also shows the other parent categories:
Parent Category 2
Parent Category 3
Parent Category 4
Parent Category 5How can we exclude the other parent categories?
Many Thanks in advance.
Hiya,
Thank you for your reply. Unfortunately, this still displays all the parent categories and 5 posts for all its children category. Is there any way to only add the children categories of the parent category your viewing?
Forum: Hacks
In reply to: Only Display Latest 10 Posts on Homepage and Nothing More – 2010 ThemeI think the code at the top is broken. Have a look at this.
<ul> <?php $recent = new WP_Query("showposts=10"); while($recent->have_posts()) : $recent->the_post();?> <li><a href="<?php the_permalink() ?>" rel="bookmark"> <?php the_title(); ?> </a></li> <?php endwhile; ?> </ul>Forum: Hacks
In reply to: Only Display Latest 10 Posts on Homepage and Nothing More – 2010 ThemeHiya Mark
Just to let you know I managed to find a code from scouring the net. Unfortunately, I can’t find the site again to give credit to.
It works. Have a look and see what you think:
-
<?php $recent = new WP_Query(“showposts=10”);
- ” rel=”bookmark”>
<?php the_title(); ?>
while($recent->have_posts()) : $recent->the_post();?><?php endwhile; ?>
Is this the best way to do this? Also, it’s probably better if it pulls some excerpt as well.
Forum: Fixing WordPress
In reply to: Show Parent and Sub/Sub-Sub Categories on PostSorry to be vague. At the minute, each post is only published on a single category or subcategory or sub-subcategory. However, there maybe some occasions in the future where a single post may apply to 2-3 categories. Now, it just got a little more complicated.
I’m using breadcrumb navxt already, so perhaps that would do for now if this is a complicated question. Do you think it’s better to just show related posts whilst reader is in a post? Just thought related categories might help as well.
Forum: Hacks
In reply to: Only Display Latest 10 Posts on Homepage and Nothing More – 2010 Themesorry Mark, but this didn’t work
Forum: Hacks
In reply to: Only Display Latest 10 Posts on Homepage and Nothing More – 2010 ThemeHi Mark,
Do I just add the above code anywhere on function file?
Forum: Fixing WordPress
In reply to: home > category > post title, What do you call this again?Cheers.
Now, I wonder how to get rid of the Home link when on homepage.
- ” rel=”bookmark”>