From WordPress Codex:
Function Reference/post type archive title
This is optimized for archive.php and archive-{posttype}.php template
files for displaying the title of the post type.
“Title of post type” is the label, not the post type registered name.
You can get the registered post type name using get_queried_object();
like this:
<?php
$obj = get_queried_object();
$post_type = $obj->name;
?>
I see in your $args
array, the caller_get_posts
, if you are using WordPress 3.1+, i suggest you to use ignore_sticky_posts
that replaced the previous one. Look this ( pagination parameters ).
Maybe i’m wrong maybe not, if you have any problems, reply here : )
Related Posts:
- what is the correct way to compare dates in a WP query_posts meta_query
- How to show all posts of the category in wordpress?
- Get the ID of the latest post
- Using meta_query, how can i filter by a custom field and order by another one?
- How to filter custom posts by tags and custom fields?
- Querying custom posts and regular posts
- How to hook get_terms() to only show count of posts that have custom meta
- Using Offset in Custom Post Type Query
- Posts per Page on custom Taxonomy Template
- Using Query Posts With Multiple Post Types And A Taxonomy
- How to get the parent’s taxonomy?
- Dynamic variable for custom taxonomy in loop?
- Query posts by custom post type and custom taxonomy
- ascending order custom post type
- Query not returning CPT posts
- Post Rank on Single Post page based on custom field
- Unable to display multiple post types in same query (WPML WP_Query)
- pre get posts changing the query
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- Quickest way to get last or oldest post date – WP Query
- ‘category__and’ for custom taxonomy?
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- query_posts with a custom post type, a meta_query and sorting by post date?
- Combine query_posts() and get_posts() into single query
- how can i get posts from custom post type particular taxonomy category
- Setting posts per page in query_posts
- How to insert content from another Custom Post type into Post?
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- Sort by custom field is not working
- Sorting multiple custom post types without a meta key/value pair by sort order
- Custom post types instead of regular post’s categories in a page template
- Change or update WordPress loop based on dropdown selection
- How to query custom post types posts filtered by multiple custom taxonomies through a form selection
- Display custom post type from dynamic custom field
- Query/list all terms and their custom post count
- Display only one post each WEEK
- List children on child post
- Get posts between custom dates
- Page template with different page and post content
- get custom post type
- Custom fields (wp_post_meta) vs Custom Table for large amount of data
- Get custom post type’s fields in a while loop as variables
- Limit the post for differents custom post type in the same wp_query
- BBPress Search results in WordPress search
- Listing all term items alphabetically / sorting loop
- How to display Related Posts based on number of taxonomy terms matched
- Filter date from post meta when date is in string format
- How to make WP_Query not to show irrelevant posts?
- What is the ID parameter for custom post types in query_posts?
- Trying to Create a PHP Variable for post_type that can be referenced Site Wide
- How to limit post per page of custom post type?
- Custom query – get_the_terms not work
- 3 random images from custom post type, each in a div with a diffrent class
- Custom Post not working as expected
- Display custom posts randomly in custom taxonomy archive
- why is the current page title being output?
- Not able to export large no. of posts in csv
- Pagination not working on custom query on a page
- Loop through posts of only 2 statuses
- Targeting custom post type via functions.php doesn’t work
- Post URL based on Custom Post Types variables
- Best way to create a search for custom post type by custom field values
- Dynamic category name in query post
- List all posts in taxonomy term
- Query all post types but limit to parents
- Passing variables through permalink structure in custom post types
- HM CMB: Post Select Field for CPT ID
- 4 posts per page from single category
- Display Posts Query with IF function
- Getting custom post type info using get_adjacent_post
- Custom Post Type Query W/Category Dropdown
- Query all posts under one taxonomy? Why is my code not working?
- Query for bbPress replies to current topic?
- Why can’t I query more than 1 post type at a time?
- Sorting the Loop by Taxonomy Value
- Custom Query: Multiple CPTs and a taxonomy filter
- WP query_posts group by meta field related
- Custom wp-query display post only today
- Filling custom post type posts from a rest api
- custom post type and a “sticky” position taxonomy
- Modify default Related Posts Code to Custom Post Type
- Order Posts in Custom Order
- Query the title of the page to show posts with matching category in the loop
- How to Create movie schedule by custom post type query
- Main site single-property.php design, as homepage of a multisite
- How to get Last post Id of custom post type in wordpress
- How to get main div html to print a list of posts inside?
- display news with pictures 3 small and one large (loop)
- Using $seed on a custom post type for randomly displayed posts
- Query Distinct Taxonomies of Custom Post Type
- Custom post type blog pagination conflict
- What’s the best way to show custom post types? With page template it’s not perfect!
- How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?
- Inserting two categories
- How do I correctly query posts from a post ID?
- How to exclude certain portfolios from a loop
- Use a Variable in update_post_meta as the $meta_key
- Quering array of post types & pagination. Articles are repeating sometimes on different pages
- Assign a tag to custom post type using a query