Taxonomy filter under Polylang

I got it. With help from this answer: get all posts ID from a category $post_type_ids = get_posts(array( ‘numberposts’ => -1, // get all posts. ‘post_type’ => ‘texto’, ‘fields’ => ‘ids’, // Only get post IDs ));

Querying Advanced Custom Fields

Try using a meta_query in your $args. You are far more flexible this way. For the full reference of the possibilities check the Codex $args = array( ‘post_type’ => ‘Product’, ‘posts_per_page’ => -1, ‘orderby’ => ‘title’, ‘order’ => ‘ASC’, ‘meta_query’ => array( array( ‘key’ => ‘product_type’, ‘value’ => ‘Paper’, ‘compare’ => ‘=’, ) ) );

Query to view scheduled or draft post

First, don’t use query_posts(). Note: This function isn’t meant to be used by plugins or themes. As explained later, there are better, more performant options to alter the main query. query_posts() is overly simplistic and problematic way to modify main query of a page by replacing it with new instance of the query. http://codex.wordpress.org/Function_Reference/query_posts The … Read more

Order terms by count – missing terms

By default hide_empty is true for get_terms. So i guess you must be missing terms which do not have posts. Try this, <?php $terms = get_terms(“autorzy”, array(‘orderby’ => ‘count’, ‘order’ => ‘DESC’,’hide_empty’=>0 )); $count = count($terms); if ( $count > 0 ){ echo “<div>”; foreach ( $terms as $term ) { ?> <?php echo $term->name; … Read more

How do I get all results from my query

You can use posts_per_page to return all post from the database Just little modification in your WP query <?php $query = new WP_Query(array(‘post_type’ => ‘any’,’posts_per_page’=>-1)); ?> Try with this modification if it works for you.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)