cabrerahector / wordpress-popular-posts

WordPress Popular Posts - A highly customizable WordPress widget that displays your most popular posts.
https://wordpress.org/plugins/wordpress-popular-posts/
GNU General Public License v2.0
281 stars 83 forks source link

How to create numerical order? #168

Closed vanloc0301 closed 6 years ago

vanloc0301 commented 6 years ago

I don't find any parameter in WP Popular Posts to create numerical order.

Look like this:

capture

I found an example in https://github.com/cabrerahector/wordpress-popular-posts/wiki/6.-Styling-the-list have this.

687474703a2f2f63616272657261686563746f722e636f6d2f7770702d6f7264657265642d6c6973742d312e6a7067 687474703a2f2f63616272657261686563746f722e636f6d2f7770702d6f7264657265642d6c6973742d322e6a7067

Have any method to do it? Thank you very much.

cabrerahector commented 6 years ago

In the examples section you linked to there are instructions on how to convert the list into a numerical one. Read a bit and you'll find the answer you're looking for.

vanloc0301 commented 6 years ago

@cabrerahector I don't use the widget. So, I can't edit HTML Markup.

I create a block have content like: [wpp post_type='post,page.post' thumbnail_width=75 thumbnail_height=60 wpp stats_views=0 limit=5 title_by_words=1 title_length=25]

I create a new page have name "Homepage" and add this block to each tab. capture

In this picture, I have 3 tabs, each tab has difference wpp query.

So, I can't use widget for my case.

cabrerahector commented 6 years ago

Although the examples were made using the widget, you can still replicate them with the [wpp] shortcode. All you need is a bit of patience and to read all the available documentation.

Take a look at Settings > WordPress Popular Posts > Parameters. The parameters you're looking for are wpp_start, wpp_end and post_html.

vanloc0301 commented 6 years ago

Thank you very much. I don't know why it has broken my site.

I add the code: [wpp post_type='post,page.post' thumbnail_width=75 thumbnail_height=60 wpp stats_views=0 limit=5 title_by_words=1 title_length=25 post_html='<li>{thumb} <a href="{url}">{text_title}</a></li>' wpp_start='<ol>' wpp_end='</ol>' ]

First look like this: capture

After adding this shortcode, it looks like: capture1

cabrerahector commented 6 years ago

Ok, the HTML part is ready. Now you need to work on the CSS part so it looks the way you want it to. Your theme won't turn it into the nice-looking numbered list automagically :P

Use the examples as a starting point to get the look & feel you're looking for. Alternatively, you might want to consider hiring someone to do it for you if you're not familiar with HTML & CSS in general and/or don't have the time to do it yourself.

vanloc0301 commented 6 years ago

Thanks, @cabrerahector . I will try to do it.