• Hi,
    I need to add subtitle code to WordPress Popular Posts Widget. This is the part of the code that I need to change but I don’t know how.

    $content .= "<li>{$thumb}<b><a href=\"{$permalink}\" title=\"{$title}\" class=\"wpp-post-title\" target=\"".$this->user_ops['tools']['link']['target']."\">{$title_sub}</b><strong>if(function_exists('the_subtitle')) the_subtitle();</strong></a> {$excerpt}<span class=\"post-stats\">{$stats}</span>{$rating}</li>" . "\n";

    I don’t know PHP and I’ve tried that but I know that something is wrong.

    https://www.ads-software.com/plugins/kia-subtitle/

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

    (@danicra)

    I also have tried this:

    $content .= "<li>{$thumb}<b><a href=\"{$permalink}\" title=\"{$title}\" class=\"wpp-post-title\" target=\"".$this->user_ops['tools']['link']['target']."\">{$title_sub}</b><strong><?php if(function_exists('the_subtitle')) the_subtitle();?></strong></a> {$excerpt}<span class=\"post-stats\">{$stats}</span>{$rating}</li>" . "\n";

    Plugin Author HelgaTheViking

    (@helgatheviking)

    Sorry, I don’t support custom implementations. If you need something updated in the plugin, let me know.

    Plugin Author HelgaTheViking

    (@helgatheviking)

    Just reviewing this, but I am guessing you need to RETURN the value of the subtitle and not ECHO it. Therefore you might want to try get_the_subtitle() or the_subtitle( null, null, false ) which come out to something similar. Good luck.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Adding subtitle to widget’ is closed to new replies.