Diogo15
Forum Replies Created
-
Forum: Plugins
In reply to: [The Events Calendar] Z-IndexThe “sticky menu” plugin you are using is setting your menu z-index to “1”, you need to set it over “102”, if you used plain javascript just update the code, if you are using a plugin for it try to look an option to increase the z-index.
Forum: Plugins
In reply to: [WP-Polls] Filter "poll_template_votefooter_markup"Thanks for you quick response, i’ll try it!
??Forum: Hacks
In reply to: Set global $posts after query_posts()NVM, thanks a lot for your help, i realized this was working on homepage:
$query->set('meta_key', 'hello_views_count'); $query->set('order', 'DESC'); $query->set('orderby', 'meta_value_num');
So i’ll add a parameter to the url on homepage and add a condition to retrive the custom sort:
add_action( 'pre_get_posts', 'get_popular_posts' ); function get_popular_posts( $query ) { if ( ! is_admin() && $query->is_main_query() $query->is_homepage() ){ if(isset($_GET['filter'])){ $query->set('meta_key', 'hello_views_count'); $query->set('order', 'DESC'); $query->set('orderby', 'meta_value_num'); } } return $query; }
Thanks for your time Esmi! ??
Forum: Hacks
In reply to: Set global $posts after query_posts()..It is in the template file: popular-page.php
Forum: Hacks
In reply to: Set global $posts after query_posts()I know where you are going, you want me to create another WP_QUERY, and yes i could do that, but i dont want to..
Thank a lot for your help btw,..
Is there a way i can populate “$posts” after query_posts(), or get the orderby in “pre_get_posts” filter (above) to work?
Forum: Hacks
In reply to: Set global $posts after query_posts()haha, no, i am making one, sorry..
Forum: Hacks
In reply to: Set global $posts after query_posts()Is there a way to change easily the post ordering depending on a custom field value, on homepage or inside a page?
Forum: Hacks
In reply to: Set global $posts after query_posts()None,..
Forum: Hacks
In reply to: Set global $posts after query_posts()And the code inside content.php relies on $posts global variable..
Forum: Hacks
In reply to: Set global $posts after query_posts()I wanted to reuse the code inside content.php
Forum: Hacks
In reply to: Set global $posts after query_posts()What I need to do is to change the order of the posts, according to the postmeta “hello_views_count”..
Do you know a better way, or how to fix the above code?
Right now all i get is a 404
Forum: Hacks
In reply to: Set global $posts after query_posts()Main Query of a page, i tried to use pre_get_posts, but i didnt had luck
add_action( 'pre_get_posts', 'get_popular_posts' ); function get_popular_posts( $query ) { if ( ! is_admin() && $query->is_main_query() && $query->get('pagename')=='popular'){ $query->set( 'meta_query', array( 'relation' => 'AND', array( 'key' => 'hello_views_count', ) ) ); $query->set('orderby', 'meta_value_num'); } return $query; }
Forum: Plugins
In reply to: [WP-Polls] Vote without ajax.Thanks for answer Lester! ??
Forum: Plugins
In reply to: [Populate database randomly] generateDummy function does not exist!mmmmmm…. I think it is complete, on line 237 and 238, you must replace generateDummy for generateLoremDummy!
generateLoremDummy does exist.
generateDummy doesn’t...a small bug.
Forum: Plugins
In reply to: [CDN Sync Tool] [Plugin: CDN Sync Tool] Preferred method of supportCool!