WordPress.org

Support

Support » Plugins and Hacks » [Resolved] [Plugin: WordPress Popular Posts] Annoying (:) after Title of Article – how to remove?

[Resolved] [Plugin: WordPress Popular Posts] Annoying (:) after Title of Article – how to remove?

  • oliversos
    Member

    @oliversos

    So my embed code is a follow:

    <?php wpp_get_mostpopular("range=all&limit=2&excerpt_length=500&order_by=views&post_type=resources&stats_comments=0"); ?>

    It’s outputting the following:

    Title of Article :
    Short excerpt of article goes here.

    How do I remove the colon that shows up right after the Title?

    http://wordpress.org/extend/plugins/wordpress-popular-posts/

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

    @hcabrera

    Hi oliversos,

    That’s hardcoded into the plugin and cannot be removed unless you hack into its code. Changes will be lost when the plugin gets upgraded, however if you still want to remove it this is what you need to do:

    # Open wordpress-popular-posts.php using a text editor such as Dreamweaver or Notepad.

    # Find this:

    // EXCERPT
    if ( $instance['post-excerpt']['active'] ) {
        if ($instance['markup']['pattern']['active']) {
            $excerpt = $this->get_summary($p->id, $instance);
        } else {
            $excerpt = ": <span class=\"wpp-excerpt\">" . $this->get_summary($p->id, $instance) . "...</span>";
        }
    }

    # … and replace it with:

    // EXCERPT
    if ( $instance['post-excerpt']['active'] ) {
        if ($instance['markup']['pattern']['active']) {
            $excerpt = $this->get_summary($p->id, $instance);
        } else {
            $excerpt = " <span class=\"wpp-excerpt\">" . $this->get_summary($p->id, $instance) . "...</span>";
        }
    }
    taketheleap
    Member

    @taketheleap

    +1 for having a quick and easy way for removing the excess colon.

    I have no issues hacking the plugin, but I would LIKE to stay up-to-date with it.

    Plugin Author Hector Cabrera
    Participant

    @hcabrera

    Don’t worry, I’m already working on a more elegant solution ๐Ÿ˜‰

    Hi Hรฉctor,

    thx for the tip!

    How long will it take until you release the more elegant version? ๐Ÿ™‚

    Greetings

    Plugin Author Hector Cabrera
    Participant

    @hcabrera

    There are reports about the plugin not working properly under WordPress 3.5, so first I need to check what’s going on and fix what might be breaking. Once I’m done with that, I’ll resume the work on the new features ๐Ÿ˜‰

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] [Plugin: WordPress Popular Posts] Annoying (:) after Title of Article – how to remove?’ is closed to new replies.