WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Popular Posts
[resolved] Annoying (:) after Title of Article - how to remove? (6 posts)

  1. oliversos
    Member
    Posted 1 year ago #

    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/

  2. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    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>";
        }
    }
  3. taketheleap
    Member
    Posted 1 year ago #

    +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.

  4. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

    Don't worry, I'm already working on a more elegant solution ;)

  5. Dennis Wagner
    Member
    Posted 1 year ago #

    Hi Héctor,

    thx for the tip!

    How long will it take until you release the more elegant version? :-)

    Greetings

  6. Héctor Cabrera
    Member
    Plugin Author

    Posted 1 year ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.