Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter Veysel Cetiner

    (@veysel-cetiner)

    Figured it out finally. The class that the methods belong to isn’t static, so you have to instantiate the class first and call the methods as member functions.

    <?php
    $t_widget = new Testimonials_Widget();
    echo $t_widget->testimonialswidget_widget();
    ?>
    Thread Starter Veysel Cetiner

    (@veysel-cetiner)

    Thanks for the quick reply Michael. The plugin is installed and activated and I am able to use the short code on pages to display a list of testimonials. I did find a couple of things in the error logs though.

    From error log in plugin directory:
    [08-Oct-2012 15:05:23] PHP Fatal error: Call to undefined function add_action() in /home/***/public_html/***/wp-content/plugins/testimonials-widget/testimonials-widget.php on line 39

    from error log in site directory:
    [08-Oct-2012 18:53:54] PHP Fatal error: Call to undefined function testimonialswidget_widget() in /home/***/public_html/***/wp-content/themes/customtheme/index.php on line 80

    [08-Oct-2012 18:56:25] PHP Fatal error: Call to undefined function testimonialswidget_list() in /home/***/public_html/***/wp-content/themes/customtheme/index.php on line 78

    One more question, Is it possible to call the methods with no parameters or should I pass an empty array?

    Thanks!

    Thread Starter Veysel Cetiner

    (@veysel-cetiner)

    update: also tried to include/require testimonials-widget.php

    <?php
    require('testimonials-widget/testimonials-widget.php');
    echo testimonialswidget_list();
    ?>

Viewing 3 replies - 1 through 3 (of 3 total)