Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter ezkay

    (@ezkay)

    I would like to have the posts ordered by WPeddit. I understand, that it is wpeddit_order.

    this is the code the developer asks to add to the functions.php:

    //code for changing the custom post order
    function wpeddit_order($query) {
    		global $wp_query;
    		if ( ! $query->is_main_query() )
    	    return $query;
    
    	      if(!is_page() || !is_admin()){
    	      	if(is_main_query()){
    				$query->set('meta_key', 'epicredrank');
    		  		$query->set('orderby', 'meta_value_num');
    		  		$query->set('order', 'DESC');
    			}
    	      }
    		return $query;
    }
    add_action('pre_get_posts','wpeddit_order');

    After adding this, the grid ends in 404.

    Is there a way to get your plugin working with WPeddit?

    For another user who asked why WPeddit isn’t working, the author answered:
    “Your theme may do something itself with the WP_Query which WPeddit uses.”

    Plugin Author Content Views

    (@pt-guy)

    Hi,
    Content Views plugin uses WP_Query to acquire posts list.

    Can you tell me what is error message in Grid view?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Is this plugin doing something to the WP_Query?’ is closed to new replies.