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

    (@hcabrera)

    Hi there!

    Yep, it can be done. Follow these steps:

    1. Go to Widgets > WordPress Popular Posts and enable the Custom HTML markup option.
    2. Set Post HTML markup to something like this (adjust where necessary): <li>{thumb} {title} <i class="fa fa-eye"></i> {views}</li>
    3. Hit the Save button to save changes.

    The {views} content tag will display only the views count value instead of the regular “XX views”. For more tags, check Settings > WordPress Popular Posts > Paramaters under Available Content Tags.

    Let me know if you need further help with it, alright?

    Thread Starter AmyRo

    (@amyro)

    Thank you very very much Hector!
    It’s work!
    But, font and colors of “Fa-eye” and “numbers” of views, looks bad. And alignment of views is now broken. Can you advise me, where can i edit this? Wpp.css file? Or Font-Awesome.css?

    Plugin Author Hector Cabrera

    (@hcabrera)

    I think it’s better if you added your custom CSS to WPP’s stylesheet and leave FontAwesome’s stylesheet as is. Make sure to copy the wpp.css file into your theme’s folder afterwards to preserve your changes through plugin updates.

    As for the alignment, try changing the custom HTML to this: <li>{thumb} {title} <div class="post-stats"><i class="fa fa-eye"></i> {views}</div></li>.

    I don’t mind helping out as long as you share your site’s URL, otherwise I’d be shooting arrows in the dark 😛

    Thread Starter AmyRo

    (@amyro)

    Thanks again for the detailed answer.
    I think I can handle with it.

    P.S. I don’t want to create a new topic, so if you allow me, I’ll ask my last question here:
    I use this plugin in the right sidebar of my site. But I also like to show “views” for each post in my site. is it possible?
    I think I need to past some code in my single.php
    Something like that, – <?php echo wpp_get_views); ?>
    But i’m not sure…

    Plugin Author Hector Cabrera

    (@hcabrera)

    Yep. Place the wpp_get_views() function in your theme’s single.php file.

    For example:

    <?php
    if ( have_posts() ) :
       while( have_posts() ) : the_post();
    
          // Some code here
    
          if (function_exists('wpp_get_views'))
             echo wpp_get_views( get_the_ID() ) . " views so far"; // This will work only inside the loop!
    
          // Rest of the code here
    ?>

    Make sure to check the link above for more details.

    Again, if you need help don’t hesitate to ask.

    Thread Starter AmyRo

    (@amyro)

    Many thanks for your expert help!
    I have no more questions for now.
    I wish you good luck and success!
    Thanks! Thanks! Thanks!

    Plugin Author Hector Cabrera

    (@hcabrera)

    Don’t mention it 🙂

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Replace "views" text with fa-icon’ is closed to new replies.