• I’m trying to change the output of this plugin using add_filter in function.php
    I want to put each popular post inside a link instead of li
    I also need to add an “eye icon” which is represented by <span data-icon=””></span> before views count, but I can’t get it to work, help please

    function wpp_custom_html_views($output){
    $output = str_replace(‘<p>’,'<p><span data-icon=””></span>’,$output);
    return $output;
    }
    add_filter(‘wpp_custom_html’, ‘wpp_custom_html_views’);

    https://wordpress.org/plugins/wordpress-popular-posts/

The topic ‘Change the output using filter??’ is closed to new replies.