I don’t know how to do it with Pages, but with Posts or CPT I use the following list of of args :
<?php $args = array(
'post_type' => 'post',
'post_status' => 'publish',
'meta_key' => 'votes_count',
'orderby' => 'meta_value_num';
$wp_query = new WP_Query( $args );
?>
What does a print_r($args)
return for you ?
Related Posts:
- A way to automatically install pages on theme install?
- Is it possible to manipulate the list of page templates?
- Pages: frontpage.php, home.php, posts page etc
- Posts in multiple Categories different single.php
- Hide certain pages / posts on wp-admin, show custom filter
- wp_insert_post breaks rewrite rules
- the_excerpt() not showing manual excerpt for Pages
- How to highlight the current page in the nav menu?
- Do I really need the div class entry?
- Displaying part of every child page?
- How do I get the next page of posts link?
- Where can I access my custom page template?
- using jQuery Cycle by Malsup with WordPress Page and Gallery
- Excluding Pages not working
- Highest number of WordPress Custom Page Templates?
- Multiple TinyMCE Editors in one Admin Page
- Create a new page in WordPress theme
- How to create a custom page(not a template) in a theme
- how to setup custom content structures
- How to Find the Page the Front Page is Using?
- How to place HTML tags in content from the_content()?
- Need help with adding templates (archives and sitemap) to WordPress child theme
- Template for landing pages
- Issue On Displaying Pages with Post Name Permalink
- Why in the static pages of my theme are showing these information?
- Remove specific published page when theme deactivated
- Migrating to WordPress – but how will it do “structured” data?
- How to code custom special page
- How to add custom meta box when you have a custom page template file
- How to track a users last visited page?
- WordPress Load Only Page Text
- How to add pages in wordpress using codes?
- How does the loop know which post to view?
- Pagination fuction in shortcode always displays on top
- Injecting pre-defined text from custom page template to editor
- Theme development: menu links a tabbed page with page jumps
- Custom theme template files
- Parent/Child pages
- WordPress Animation Adjustments
- Show only pages you are author of
- How do I open a post in a custom page in wordpress?
- Pages not displaying as sections on static page
- How to show metabox on page if it is using a template
- makeing a terms of use page that is part of the theme
- Creating a theme just to deploy a single page
- Problem with Displaying Custom Theme Page’s Content
- WordPress Twenty-Fourteen: How to Remove Home Page Header Image from Other Pages
- Alter theme pages on language switch
- wp_editor some functionality not working on custom theme
- Display content on Single page
- One-Page WordPress Template
- How to create multiple pages in a client theme?
- Advantages/Disadvantages Using Theme Editor Instead of Pages
- Can you create a custom page with content in the center already defined?
- how to make a new page affected by a theme’s index.php layout?
- How get the 10 most viewed pages (not post)
- How can I change the title of the Home link in the navigation bar?
- The content not wrapped in paragraph tags with get_page_by_title()
- Standard Way To Do Custom Work Within A Page?
- How do I get information about a page, such as featured image, except, and title?
- How to detect mobile devices and present them a specific theme?
- Using wp_add_inline_style without a stylesheet
- The difference between calling wp_enqueue_scripts to load scripts and styles in custom theme
- WordPress twentytwenty theme inline css overriding css body
- What is the problem if I use CDN in my WordPress parent theme(built using bootstrap)?
- How can I insert default widgets when my theme is activated (similar to what twenty eleven does)?
- date_i18n() issue
- Should use widgets in this case?
- Changing the entire control choices using wp.customize with JavaScript
- Static Front Page problem
- Enabling Default Widgets in a Custom Theme
- get_post() function returns post even if it is trashed
- How to regenerate thumbnails when they’re stored on S3
- customizing the_password_form filter
- searchform.php override not working
- Load child template based on parent
- How to add material design css in wordpress and woocommerce
- Timber: Get single image from media library with all attributes
- How to remove text “Log In” from login page
- Can’t use admin_enqueue_scripts or wp_enqueue_script
- Data Validation in wordpress
- Localize script not working in ajax
- How can i make multilevel menu in wordpress theme with bootstrap
- Setting conditional background image from meta value
- How to Emulate Default Navigation Menu Behaviour in a Custom Theme?
- WordPress comments title
- How can I run code in functions.php when switch_theme() is called?
- Default customizer colors aren’t displayed outside of the preview
- More HTML elements variety in visual editor
- change wordpress website logo url [duplicate]
- Create new sidebars trough admin post/page metabox
- How one category can have different fields?
- How To Customise WordPress Comment Submit Button?
- Next/Previous post navigation
- Single Featured Image Repeating
- How can I install my custom-made theme on a wordpress.com blog? [closed]
- A problem in loading index.php
- .submenu class missing in output from wp_nav_menu
- Configuring static page with add_rewrite_rule gives 404 after navigating to Permalinks admin panel
- Cart button not working on mobile version [closed]