WordPress.org

Ready to get started?Download WordPress

Forums

Testimonials by Aihrus
[resolved] Theme function syntax? (3 posts)

  1. Brett2000
    Member
    Posted 1 year ago #

    Hi,

    Your testimonials plugin looks great, but could we please have an example of the syntax for calling the theme function?

    You say:
    <?php echo testimonialswidget_widget( $args, $number ); ?>
    testimonialswidget_list] ■[testimonialswidget_list]
    ■[testimonialswidget_list category=product hide_not_found=true]
    ■[testimonialswidget_list category=product tags=widget limit=5]
    ■[testimonialswidget_list char_limit=0 target=_new]
    ■[testimonialswidget_list hide_source=true hide_url=true]
    ■[testimonialswidget_list ids="1,11,111"]
    ■[testimonialswidget_list meta_key=testimonials-widget-company order=asc limit=10]
    ■[testimonialswidget_list paging=true limit=10]
    ■[testimonialswidget_list tags="test,fun" random=true]
    ----

    Can you please give an example of calling this out? Some people rarely use WP and PHP and don't regularly setup Arrays for calling.

    I get this error:
    --
    Missing argument 1 for testimonialswidget_widget(), called in /home/public_html/wp

    --

    Thanks,
    -Brett

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

  2. Brett2000
    Member
    Posted 1 year ago #

    See above post, I also get this when I think I have it setup properly:
    --
    Using $this when not in object context in /home/public_html/wp-content/plugins/testimonials-widget/testimonials-widget.php on line 680
    --

    Is there a bug in calling it out this way?

    Thanks,
    -Brett

  3. Michael Cannon
    Member
    Plugin Author

    Posted 1 year ago #

    Does the following help?

    <?php
    $args = array(
    'category' => 'product',
    'tags' => 'widget',
    'limit' => 5
    );
    echo testimonialswidget_list( $args );
    ?>

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.