Hi Erick,
Please check both FAQ and Installation sections, there you’ll find info on alternatives to the widget version of the plugin.
Thread Starter
Erik
(@erikandershed)
Hi Héctor!
Yes I have looked at them. But they do not show how to make it in a loop with this elements:
<?php the_post_thumbnail(array()); ?>
<?php the_title(); ?>
and more
so I can make the listing in the way I like. I can’t find an example of this anywhere.
Thanks!
I’m sorry, I don’t understand. Can you elaborate more, please? What exactly do you want to do?
Thread Starter
Erik
(@erikandershed)
Sorry about my english 🙂 Will try to make it more clear.
To list post in wordpress, wordpress has an php loop. I like to do this with this plugin. So I can build the contant exacly as I like. It will make so I got more control over the content.
Best regards,
Erik
I see. Well, there’s an option for that too 😉 You can customize the HTML structure by using the wpp_start
, wpp_end
, post_start
and post_end
parameters with the wpp_get_mostpopular() template tag. You can find more info about these (and other parameters) on your wp-admin > Settings > WordPress Popular Posts > FAQ page.
Thread Starter
Erik
(@erikandershed)
Great! Thanks!
Just one more question. I am just a PHP beginner, can you show how this loop look like. Sorry for this, but it would help me super much!
Best regards,
Erik
No problem, here’s an example:
<?php
if ( function_exists('wpp_get_mostpopular') ) {
wpp_get_mostpopular( 'wpp_start=<ol>&wpp_end=</ol>&post_start=<li>&post_end=</li>&do_pattern=1&pattern_form="{thumb} {title} - {stats}"' );
}
?>
Thread Starter
Erik
(@erikandershed)
Thanks!
We are almost there 🙂
where it says "{thumb} {title} - {stats}"
is it possible to make it more changeable?
I am making an RSS feed with the most popular post in a week. And I like to be able to have other tags then the ones find in {title} and so on. So it would be great to beable to use standard wordpress calles for title, tumbnail, content and so on. like this:
<a href="<?php the_permalink() ?>"><?php the_post_thumbnail(array()); ?></a>
<a href="<?php the_permalink() ?>"><?php the_title(); ?></a>
<?php echo excerpt(15); ?>
<a href="<?php the_permalink() ?>">read more</a>
I am crossing my fingers that this is possible. It would be great it mean I can make the RSS feed and a widget style just the why I like it to look and work.
Best regards,
Erik
At the moment, no. However, I’m planning to modify the custom HTML feature for more flexibility – it might be included in the next release or the one after.
Thread Starter
Erik
(@erikandershed)
oh no.. Ok it would be a great addition to the plugin.
Really hopping for this update as soon as possible.
Best regards,
Erik