WordPress.org

Forums

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

  1. oliversos
    Member
    Posted 2 years 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. Hector Cabrera
    Member
    Plugin Author

    Posted 2 years 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 2 years 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. Hector Cabrera
    Member
    Plugin Author

    Posted 2 years ago #

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

  5. Dennis Wagner
    Member
    Posted 2 years ago #

    Hi H├ęctor,

    thx for the tip!

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

    Greetings

  6. Hector Cabrera
    Member
    Plugin Author

    Posted 2 years 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

  • WordPress Popular Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.