WordPress.org

Ready to get started?Download WordPress

Forums

Testimonials by Aihrus
[resolved] Testimonial archive (6 posts)

  1. NWTD
    Member
    Posted 1 year ago #

    I'd like to change and rearrange the content that's showing on the testimonials archive. How would I go about doing this? Creating an archive-testimonials-widget.php? Do I need to call a WP_Query for this post type? What items can I call out for this archive?

    http://wordpress.org/extend/plugins/testimonials-widget/

  2. NWTD
    Member
    Posted 1 year ago #

    bump

  3. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Don't bump in less than 24 hours much less than 2-business days. It's rude.

    If you want private or priority support, read how to obtain it at the bottom of http://wordpress.org/extend/plugins/testimonials-widget/.

    I'll answer your question when I next come online from Sabah or Sarawak.

  4. NWTD
    Member
    Posted 1 year ago #

    I apologize. I did not realize it had only been 24 hours.

    Your time and support are greatly appreciated.

    Please accept $20 worth of Karma.

  5. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Cool, thanks. I really appreciate the apology and donation. You caught me still online, I was just thinking to nap before dinner here in Lawas, Sarawak, Malaysia.

    I would recommend copying your theme's current archive.php file to archive-testimonials-widget.php.

    Then in the loop context area, revise the layout as desired. Within the loop itself or the renamed content.php to content-testimonials-widget.php you can use <a href="http://codex.wordpress.org/Function_Reference/get_post_custom">get_post_custom</a> to pull the custom meta data.

    This will give you a result array like the following.

    Array(
        [_edit_last] => Array
            (
                [0] => 1
            )
    
        [_edit_lock] => Array
            (
                [0] => 1358221258:1
            )
    
        [_metaidlast] => Array
            (
                [0] => 4
            )
    
        [testimonials-widget-title] => Array
            (
                [0] => Auckland, New Zealand
            )
    
        [testimonials-widget-email] => Array
            (
                [0] =>
            )
    
        [testimonials-widget-company] => Array
            (
                [0] =>
            )
    
        [testimonials-widget-url] => Array
            (
                [0] => http://wordpress.org/support/profile/gorgeouscreative
            )
    
        [_thumbnail_id] => Array
            (
                [0] => 14809
            )
    
        [_wp_old_slug] => Array
            (
                [0] => gorgeouscreative
            )
    )

    As you can see, the later array keys, like testimonials-widget-*, let you know which meta fields exist.

    To have easier access, you can use <a href="http://codex.wordpress.org/Function_Reference/get_post_meta">get_post_meta</a> like get_post_meta( get_the_ID(), 'testimonials-widget-title', true ); to grab the single entry of the testimonial job title or location data.

    Don't forget to update content.php to content-testimonials-widget.php in your archive-testimonials-widget.php file, if needed.

    Do you need more guidance?

    Ciao!

  6. NWTD
    Member
    Posted 1 year ago #

    Thanks for the quick response and your time. I'll give this a whirl and see where it takes me. I'm actually developing in the Genesis Framework, so I'll have to tweak their loop a bit to get this to function.

    Thanks again.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.