• Resolved Roman Cieciuch

    (@romancieciuch)


    Hello there!

    Just wanted to ask whether you can add a parameter to the function wpp_get_mostpopular that it can return generated code instead of echo it?

    As I want to store generated code in the variable.

    Thanks!
    Roman

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Hector Cabrera

    (@hcabrera)

    Hi Roman,

    The wpp_get_mostpopular() function is actually just a wrapper that internally calls the [wpp] shortcode and echoes its output.

    To get the HTML output you can use the do_shortcode() function just as wpp_get_mostpopular() does. For example:

    $popular_posts = do_shortcode("[wpp range='last7days'");
    var_dump($popular_posts);
    Thread Starter Roman Cieciuch

    (@romancieciuch)

    Ok, I’ll give it a try.

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Additional parameter to wpp_get_mostpopular’ is closed to new replies.