WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] a post inside a post - Testimonials (3 posts)

  1. pixeline
    Member
    Posted 4 years ago #

    Hi!

    I need to have testimonials on my website. Basically, what i call a testimonial is a title, a banner image, an author, and a chunk of html code. So i would suppose you could consider it to be a post within a "testimonial" category.

    They would be displayed in various forms:

    - one random pick on the frontpage (just the banner and a link to the testimonial)
    - inside specific pages (inside a div)
    - on their own page.

    Can i tweak a wordpress category to do that? What do i need to create/modify in my theme? And last but not least, how to implement the banner image?

  2. MichaelH
    Member
    Posted 4 years ago #

    1. one random pick on front page - add a get_posts() loop to your theme's index.php in the appropriate place. The get_posts() arguments should ask for a random post in your "testimonial" category,

    2. same as 1, but in a Page Template.

    3. let the WordPress native category archiving process handle "on their own page" by using the Category widget (or wp_list_categories).

  3. pixeline
    Member
    Posted 4 years ago #

    Thanks a lot Michael, I figured out 1 and 3 but your suggestion for 2. feels like a glimpse of hope. I was just thinking to solve it via a WJCTestimonal plugin, but then, would have 2 separate systems for my "testimonials" (a specific post category and then the plugin's own data storage) - and i was feeling unseasy about having to duplicate the data across the two. I'll try that first thing tommorrow.

Topic Closed

This topic has been closed to new replies.

About this Topic