The wp_count_posts
function has parameter $type
for post type to count, you should use this parameter if you want to get number of jobs
like so:
$count_posts = wp_count_posts( 'jobs' )->publish;
Related Posts:
- How do I change the author of a custom post type?
- Where is a custom post type’s “description” surfaced in WordPress?
- Per Post Type Revision Numbers
- Create page to handle form submission
- Hide admin bar on certain post type
- How can I convert a Custom Taxonomy to a Custom Post Type?
- Exclude a term of a taxonomy with a custom post type in a search
- Remove custom metaboxes from custom post type
- Menu position (admin menu) of pages
- Secondary loop pagination on custom post type single post gets redirected to first page
- Remove tinyMCE from admin and replace with textarea
- Displaying related posts in a custom post type by a custom taxonomy
- Tag.php not displaying posts with the tag
- Loop through categories and create tab for each
- How to add multiple featured image in meta box in post editor?
- Is there a way to relate custom post types?
- get_queried_object error How to show post count by month in the taxonomy page
- Adding Meta Boxes while Registering a Post Type in a Class
- List custom post type by custom tax term as page title
- How can I change the title of an Add New page in Admin for custom post type
- Page Templates Drop Down Select for Custom Post Types
- Modifying date filter on admin page for custom post type to link to custom field
- How can I give CPT archive correct body class?
- How would you associate location data with a post?
- How to dynamically attach pictures to a carousel
- Is it possible to apply a meta_query to one specific post type in a query with multilple post types?
- get custom post type thumbnail
- Deleting Custom Post type data using mySQL command
- Featured Images does not show in custom post type
- Update menu when saving settings
- I did group my search results by post type, but how can i give each of them its own order?
- Custom Taxonomy Navigation, with current menu items for children?
- Only view/edit/delete CPT made by users with the same role
- How to start a new post with custom Taxonomies already set?
- How to add rewrite rule to custom post type with parent in url with cpt ui?
- WooCommerce sort products by the actual product width(not the shipping width)
- How to prevent a CPT’s slug and page slug from conflicting with each other?
- Display correctly using metabox.io
- Retrieve custom field from Contact Form 7 [closed]
- How to Add multiple instance of meta box to custom post type
- comment_form() not showing on custom post type
- Manage Columns : order by post_parent’s title
- Different rewrite rules for taxonomies and cp in multisite?
- count results in search page based on custom category
- Limiting posts_join, where, etc to a specific WP_Query object?
- Trick to get custom post types to show up on a custom taxonomy page?
- What is the ID parameter for custom post types in query_posts?
- Number of posts in the archive
- More quicktag driving me nuts
- If there is only one post (show elements) else (show other elements)
- the_post() is printing titles in page footer
- Use remove_meta_box conditionally on custom post type
- create custom meta box with default value
- How to setup a single post page for my custom post type?
- Custom Post Type page sorts differently on different environments
- Undefined $post in wp_query
- fetch custom post by meta key if key value is does not know
- Get image from external URL
- Showing all posts and custom post types by using one category
- Issue with Custom Post Types and Single
- How do I edit the WordPress post.php file?
- Posts are not rendering perfectly [closed]
- Echo custom post meta from options array
- Filtering the_content, but still need to display the unfiltered content inside filter
- Value of post meta dropdown is not showing in WordPress
- Looping through custom taxonomy and display custom post types (Custom Post Type UI)
- Displaying Portfolio Filter by Category Order (alphabetically)
- Function to add custom HTML into head in custom post-type list page
- Invalid file type when using wp_upload_bits to upload PDF to a custom post type
- What is the parameter : ‘Customs-fields’
- set post_type based on custom taxonomy permalink
- Get previous and next custom post by custom field
- Show only Current category and sub category of custom post wordpress
- Order posts by taxonomy terms
- Creating post template for a Custom Post Type
- WP Admin Dropdown List Filter for custom (ACF) field on custom post type(s)
- Why are custom taxonomies only appearing on the edit page of one of these types, but not the other?
- Add Custom Field in Product in WP Admin and send to Order Webhook
- How to associate custom taxonomy terms with custom post type?
- Is it possible to create 2 unique titles for an Events custom post type: Upcoming Events and Past Events?
- Add Pagination in custom Blog page template
- get_the_terms child terms for current post/custom post only
- Show Recently Viewed Custom Post to the visitor without plugin
- Custom Post Type Query by user id
- Display title of custom post type dynamically
- WordPress API only returning HTML
- select custom post type on regular post
- woocommerce post_type conflict with existing post type
- Work and Display a Custom Post Type as a normal Post
- Get month and day from a Date Picker custom field
- Is it possible to add and display custom post types to an array?
- How to change post status link order(priority) on cpt listing page
- Issue with permalinks for custom post type
- How to loop custom post type posts by author?
- Timetable of Custom Meta Data using Custom Post Type and Custom Taxonomy
- Change the contents of a dropdown through the admin panel?
- Linking from a list of custom post type items to a single – get_post_permalink not working correctly
- Remove plugin’s custom post type archive page and single pages [closed]
- Adding/Changing Functionality of Custom Post Type Main Admin Page
- After wp_insert_post() custom post type does not show in the admin