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
279 stars 83 forks source link

Using with Elementor's Query ID #191

Closed gasmas75 closed 6 years ago

gasmas75 commented 6 years ago

Hello, I have a page built with elementor and I want to display last 24 hrs popular posts. I'm using a Query ID to retrieve the posts from the plugin:

// Post filter by day //
add_action( 'elementor_pro/posts/query/dailypop', function( $query ) {
$query->set( 'orderby', wpp_get_mostpopular() );
} );

Using this id on an Elementor's Post Widget correctly returns the posts I want. But not styled as it should. Using the query within elementor's environment should style the results, buy instead I get a list of posts (correct) and some extra posts coming from elementor's query (ordered by date). I've disabled the popular posts css stylesheet, since I don't use it. Is there something I'm missing here?

cabrerahector commented 6 years ago

Hi there,

I'm sorry, I'm not really familiar with Elementor since I don't use it (and it seems you're using the Pro version as well, and so I can't check on my own what's going on).

My guess is that Elementor expects the HTML list to be structured in a certain way. If so, have a look at this FAQ. Otherwise I'm afraid you'll have to ask the Elementor team for help with this.

If you have any other questions don't hesitate to ask.

cabrerahector commented 6 years ago

Closing due to inactivity.