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:
- How do I query a custom post type with a custom taxonomy?
- what is the correct way to compare dates in a WP query_posts meta_query
- How to get post content by calling ajax?
- 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?
- Return all custom meta data for one custom post type
- Display a query with multiple post types and same relationship on a single page
- Fail to compare dates in meta_query
- How to filter custom posts by tags and custom fields?
- Order by & include array by specific post ids
- How to call a custom post with get_posts() instead of query_posts()?
- Custom post type archive 404’s with paginate_links
- Display Custom Post Type Fields
- Querying custom posts and regular posts
- Loading Custom Post Type Events into jQuery-based FullCalendar?
- Limit the post for differents custom post type in the same wp_query
- Retrieving 3 latest post from each of 5 different custom post types
- How to hook get_terms() to only show count of posts that have custom meta
- Using Offset in Custom Post Type Query
- how to group custom post type posts by custom taxonomy terms
- order by meta_value serialized array
- Posts per Page on custom Taxonomy Template
- Using Query Posts With Multiple Post Types And A Taxonomy
- How to get the parent’s taxonomy?
- Loading post content in FancyBox
- Dynamic variable for custom taxonomy in loop?
- Query posts by custom post type and custom taxonomy
- Multiple templates for custom post type
- Query post types with multiple keys
- ascending order custom post type
- posts_nav_link on single post template
- Query not returning CPT posts
- Post Rank on Single Post page based on custom field
- How to get only one category of custom post type?
- Used with meta_query in query_posts works slowly
- Unable to display multiple post types in same query (WPML WP_Query)
- pre get posts changing the query
- Query for posts in 2 taxonomies
- Prevent change with new query_posts()
- How to make an archive page displaying posts in a date range
- Get permalink and title by post name?
- How to get current post id of a custom post type in a loop using template singel-{custom type}.php?
- Custom Post Type sorted by Title
- Get all posts WHERE custom_field is LIKE value
- Quickest way to get last or oldest post date – WP Query
- How to display recent posts added in several custom post types
- ‘category__and’ for custom taxonomy?
- Post the content of a specific “Custom Post Type” post within a post using a shortcode
- Conditionally Query Custom Post Types by Post Meta for Blog Home Page?
- Display custom post types with custom date field value (before today) & order by custom date field
- Separate Posts and Custom Post Type in Custom Taxonomy archive template
- reference the current category being used in the category.php page
- How to dynamically build a multiple taxonomy query loop within a post type’s single loop?
- Take Variables Set in Functions.php and Echo Them Inside My Custom Post Template
- List custom post type by custom tax term as page title
- query_posts with a custom post type, a meta_query and sorting by post date?
- How does the $post_type global variable work?
- Custom query shows custom post types in trash
- Multiple post type queries (with specific arguments for each)
- 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
- Custom query works but returns “Undefined Offset: 0”
- 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
- What’s a better alternative to this code?
- Display custom post type from dynamic custom field
- Query/list all terms and their custom post count
- Archive for custom taxonomy lists all posts instead of current taxonomy
- Display only one post each WEEK
- List children on child post
- How to query_post custom posts within default taxonomy?
- How do i calculate the total of values of custom fields in custom post types?
- Get posts between custom dates
- child of post type (custom)
- Page template with different page and post content
- How to use custom taxonomies to reference complex relationships?
- Order query using custom meta data
- What’s the best way to show custom post types? With page template it’s not perfect!
- How to apply order on custom taxonomy and custom meta key on custom post type
- send user to first page of results when reposting to page?
- How to grab data (titles, thumbnails and custom fields) from multiple posts to populate a new array efficiently?
- Query custom type posts by array of IDs
- 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
- Render a loop in Timber (twig for WordPress)
- show custom post’s post in two different divs [duplicate]
- How to get Custom post type by related category ID
- Trying to set up a range filter for related custom post types
- Quering array of post types & pagination. Articles are repeating sometimes on different pages
- Display ACF object field data using Elementor Custom Query
- Assign a tag to custom post type using a query