• Resolved superamon

    (@superamon)


    Hello,

    Currently, I have two widgets showing post titles, being one of them WordPress Popular Posts. The other widget, which shows the most recently updated posts, replicates the title formatting, in other words, it automatically identifies what appears in bold and what doesn’t in the original post title (as you can see in http://i.imgur.com/lXtK0ne.png).

    This is done using the tags on the title of the article, on the edit article section (http://i.imgur.com/vVbHSB8.png).

    I would like to know how can I also use this formatting in WPP widget.

    Thank you in advance!

    https://ww.wp.xz.cn/plugins/wordpress-popular-posts/

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

    (@hcabrera)

    Hi there!

    WPP strips out all HTML tags from the post title by default, and there’s no way to change that from the widget. You’ll have to modify WPP’s code for this:

    1. Go to Plugins > Editor and select WordPress Popular Posts from the dropdown at the right.
    2. Find:
      // Strip HTML tags
      $title = strip_tags($title);

      and change it to:

      // Strip HTML tags
      //$title = strip_tags($title);
    3. Hit the Update file button to save changes.

    Keep in mind that any changes made to plugin’s files will be undone the next time you update WPP, so make sure you bookmark / save this code somewhere for future references.

    Thread Starter superamon

    (@superamon)

    Hello again,

    It works perfectly.

    Keep up the awesome work!

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Doubs about title formating’ is closed to new replies.