WordPress.org

Ready to get started?Download WordPress

Forums

Insert PHP
[resolved] Able to use in Widget? (2 posts)

  1. kwaimind
    Member
    Posted 3 months ago #

    Hey

    Very interested in using this for a website but as a widget rather than in a post/page.

    Ran the following in a page and works perfectly but in a widget just echoes the text.

    <div class="homepage-widget-blog">
    <h3 class="aligncenter home-widget">Testimonials</h3>
    <div class="woothemes_testimonials">
    [insert_php] do_action( 'woothemes_testimonials', array( 'limit' => 4, 'before' => '<div class="type-testimonial animated fadeInUp">', 'display_author' => true ) ); [/insert_php]
    </div>
    </div>

    Any ideas?

    Thanks,

    Dan

    https://wordpress.org/plugins/insert-php/

  2. WillBontrager
    Member
    Plugin Author

    Posted 3 months ago #

    Sorry, kwaimind, Insert PHP works only in posts and pages.

    If you can get the testimonials dumped into a file, the file can be imported into a Text widget with JavaScript. See http://www.willmaster.com/library/tools/text-to-javascript-converter.php for a text-to-JavaScript converter.

    Will

Reply

You must log in to post.

About this Plugin

About this Topic

Tags