Output only the latest post from each child category

Support Forums for LiveMesh Themes & Plugins Forums Invent Theme Support Output only the latest post from each child category

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #26401
    palmtree
    Participant

    Hello Code Master,

    I’ve been searching on google how to do this for more than 6 hours today but I couldn’t find the solution. I am devastating.. I want to output only one latest post each from each children’s category under their parents (cat=3). So far, apart from getting more than 1 post from each child category, it is successful. My code is below.

    http://pasted.co/a94830b3

    At the moment,
    <?php $args = array('numberposts' => 1) ?>

    As you can easily guess..this code doesn’t seem to do anything but I hope you know what I am trying to do here. I want to limit each child category’s post to be just one (the latest post) by putting numberposts (=> 1).

    My question could be little too far from the level of support you offer to the theme users however it would be great if you could take a look at this.

    Thank you.
    Palmtree

    #26403
    Raghavendra
    Moderator
    #26435
    Raghavendra
    Moderator

    Reply by the thread owner palmtree after we migrated to the new server – meteorite.

    Thank you very much for the link. I have followed the explanation in those pages and created the code http://pasted.co/090113c2

    But this code output only one post under the cat id=54.
    There are multiple child categories under id=54. And what I want to do is to output one (latest) post from each category.

    For example, if there are 7 categories under the cat id=54, the number of output post should be 7. I hope you can get what I have been trying to do…

    #26436
    palmtree
    Participant

    Thank you very much for the link. I have followed the explanation in those pages and created the code http://pasted.co/090113c2

    But this code output only one post under the cat id=54.
    There are multiple child categories under id=54. And what I want to do is to output one (latest) post from each category.

    For example, if there are 7 categories under the cat id=54, the number of output post should be 7. I hope you can get what I have been trying to do…

    #26487
    palmtree
    Participant

    I have posted this question to stackoverflow http://stackoverflow.com/questions/43611578/output-latest-posts-from-each-child-categories-of-particular-parent-category. So far no luck.
    But you are more than welcome to give me some advise. If you could do, it would be awesome!

    #26503
    Raghavendra
    Moderator

    Sorry to hear you are still having trouble with this. Have been extremely busy moving to a new domain, new server etc. Will find some time and see if I can address this. Also, pls post to https://wordpress.org/support/forum/wp-advanced/ as well meanwhile and see if there is any luck.

    #26504
    palmtree
    Participant

    Thanks Mateorite,
    I understand you are busy but thanks for your support and introducing me to the wordpress support site.
    I have posted the same topic as I did on stackoverflow.
    https://wordpress.org/support/topic/output-latest-posts-from-each-child-categories-of-particular-parent-category/

Viewing 7 posts - 1 through 7 (of 7 total)
  • The forum ‘Invent Theme Support’ is closed to new topics and replies.