WordPress.org

Ready to get started?Download WordPress

Forums

KIA Subtitle
Adding subtitle to widget (4 posts)

  1. danicra
    Member
    Posted 11 months ago #

    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.

    http://wordpress.org/plugins/kia-subtitle/

  2. danicra
    Member
    Posted 11 months ago #

    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";

  3. helgatheviking
    Member
    Plugin Author

    Posted 11 months ago #

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

  4. helgatheviking
    Member
    Plugin Author

    Posted 10 months ago #

    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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.