BuddyDev

Search

How to make a Shortcode to display post thumbnail of certain category

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #9024

    Hi,

    Thanks for previous helps and I’m very appreciated about that.

    Currently I meet an issue that I want to display thumbnail of most recent post in certain category and it should be wrapped with shortcode.

    For example, I have a category called – news and everyday, a new post will be published in the news. In each of post, there is a main picture. What I want to do is to use a shortcode to display this post thumbnail but it should be changed everyday.

    So, I’m wondering do you have any ideas or suggestions about that?

    Thank you very much.

  • Keymaster
    (BuddyDev Team)
    Posts: 24190
    Brajesh Singh on #9039

    Hi Dandy,
    There may be already existing plugin for it.

    Are you looking for something like this?
    https://wordpress.org/plugins/category-posts/
    May be simpler version?

    Also, If you want to code it yourself, a look at WP_Query will help you.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: not resolved