WordPress.org

Ready to get started?Download WordPress

Forums

IvyCat AJAX Testimonials
[resolved] Wont work inside header (5 posts)

  1. strongtyer
    Member
    Posted 1 year ago #

    My rotating testimonial wont work when it is inside a header. It has to be within the entry for it to display. Why is this and how can I fix it? So far it only works if I paste the shortcode in a page. When I put it in my sites header, (not by editing or creating a page) it just displays the shortcode and not he actual testimonials. Same shortcode in both places.

    http://wordpress.org/extend/plugins/ivycat-ajax-testimonials/

  2. Daniel Gilfoy
    Member
    Plugin Author

    Posted 1 year ago #

    Hello strongtyer,

    For all shortcodes used in template files rather than in pages you need to use the function do_shortcode().

    so for the testimonials you'd do:

    echo do_shortcode('[your_whole_shortcode_here attribute="value"]');

    And so on. Just make sure if you use '' to enclose your shortcode you use " to enclose your shortcode attributes.

    Hope this helps,

    Daniel

  3. ivycat
    Member
    Plugin Author

    Posted 1 year ago #

    Hello strongtyer,

    For all shortcodes used in template files rather than in pages (in WordPress Editor) you need to use the function do_shortcode().

    So for the testimonials you'd do:

    echo do_shortcode('[your_whole_shortcode_here attribute="value"]');

    And so on. Just make sure if you use '' to enclose your shortcode you use " to enclose your shortcode attributes.

    Hope this helps,

    Daniel

  4. strongtyer
    Member
    Posted 1 year ago #

    Thanks. That's what I needed to know! I think some of the instructions could be unclear for someone with little experience in php or html.

  5. Eric Amundson
    Volunteer Moderator
    Plugin Author

    Posted 1 year ago #

    Thanks for the feedback, strongtyer. We'll be working on improving the documentation as time permits. In the meantime, please feel free to post here in the support forum if you've got questions.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.