You don’t specify this, but if your lessons
are being pulled in along with your arrangements
then you must be using default WordPress posts
for the Lessons… assuming that, here’s what’s happening in your code.
On the second line when you’re setting your query arguments ($args
) you specify that you want BOTH the posts
post type and your custom arrangements
post type. So you get both.
Simple fix though, just use this for your $args
.
$args = array(
'post_type' => 'arrangements,
'post_status' => 'publish',
);
You could still leave it as an array though, no harm…
$args = array(
'post_type' => array('arrangements'),
'post_status' => 'publish',
);
Give that a try and see if you get the desired result.
Related Posts:
- Highlighting wp_nav_menu() Ancestor Class w/o Children in Nav Structure?
- How to get the posts of a custom taxonomy term
- Why are the comments disabled by default on my custom_post_types?
- Getting the IDs of a custom post type
- Admin Area Custom Type Search By Meta Fields Without Title & Content
- Custom Post Type menu name
- Get Custom post with ID
- Is it OK to move admin menu items?
- Adding %author% in custom post type URL structure?
- Syntax to get the Nth item in a list of custom post types?
- Filter by custom Field for Custom post type Admin Listing
- Problem excluding category from get_next_post
- remove support for ‘Categories’ for a custom post type
- Display different gutenberg template from selected post attributes
- Recent comments on author page?
- How to show posts from multiple post types in a single loop? And display them separately on the same template
- WordPress custom post type Single.php?
- WordPress is executing URL in code when called via wp_mail()
- Automatically Add a Category to a Custom Post Type
- Detect if 1st, 2nd or 3rd level custom page?
- How to use custom fields to enable sticky posts on custom post types?
- Custom Fields vs Separate Table
- How to insert content from another Custom Post type into Post?
- Display custom post data in sidebar w/ dropdown
- Using several custom fields as custom post title
- Using global $post; to get featured image for custom post via WP_Query
- Hide specific parent categories from post edit
- Access $post object when adding custom columns to list table
- Custom template with CPT doesn’t display on frontend
- How do I get array of types associated with a taxonomy?
- Custom template page with custom archives listing by user
- Copying existing posts after new post type has been added
- Show category ID on custom post type
- Unable to get post archive link
- How to call in Custom Post-Type Categories?
- get_category_parents for custom post type taxonomy
- Child post with numeric only slug keeps redirecting to parent
- creat filter with wp_query
- Are pages consuming more server resources than posts?
- Possible to add different google analytics in custom post type?
- What is the best practice for displaying my plugin content in themes?
- Portfolio Page for Classic Posts
- next/previous links on custom post single a little screwy
- How to change custom post type position from backend
- Archive for a Taxonomy of a Custom Post type
- Get theme URL without printing result
- Including all post id’s of a custom post type into an array
- Dump custom post type database
- Display an authors post on a single page only when they are logged in
- Create a custom post type for a photo post
- Linking to Post Types from wp-admin
- Shared terms between taxonomies
- Custom post type Shortcodes wordpress
- custom hierarchical taxonomy and custom post type list contains surplus posts
- Show category and tag link as a submenu under custom post type submenu
- How to add new post using a form to categories when categories are using as menu
- Create a select metabox that the user can pupolate?
- Display custom meta on page that has been check in custom post type
- Custom Post Type Archive template not being called
- How to selected value default in option list?
- Automatically add a character to field in edit post page
- Add the custom post term to the custom post title
- Display 3 recent posts from one taxonomy
- Query for bbPress replies to current topic?
- Custom post type and multi taxonomies + customize url
- Grouping custom wordpress post types by acf value
- Get_post_custom not fetching value from array wordpress
- Archive Post Not Showing All Post
- Get an array of the number of post per year of a custom post type (WordPress)
- WordPress Post ID overwritten when I create a new post?
- Private:Autodraft post created automatically, Is that normal?
- WordPress Custom Taxonomy – If not parent term
- Need folder for CPT templates for eg: single-{post_type}.php
- Custom taxonomy with custom post type template not showing
- Loop to display parent categories in custom taxonomy
- Collect custom post in a calendar
- pagination for a custom query
- Custom nav menu current item custom link problem
- How To Loop Through list with Custom Post Types
- Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values
- redirect old post type url to new structure url
- Custom Post Type + Category archive
- Customizing a plugin function using a hook
- one get_posts to return a number of custom posts for each meta value
- custom_post_type with umlaut in name
- $wpdb returns no results with SELECT query on custom post type, works on default post type
- current_page_item and custom post type?
- How do I do this?: If custom post type exists, echo it, else do not
- WordPress custom post type post and category links 404
- Count of posts with meta_key filled in?
- Get Posts From A Certain Post Type In An ID Array
- Custom post type efficiency
- One set of categories for multiple custom posts
- sidebar hierarchical menu category & custom post type
- Choose custom post type template by category
- Query order by meta value force specific tag first
- Filter page ID outside the loop and order
- the_post_navigation in single page with multiple taxonomies
- display related posts based on the PAGE TITLE
- Custom Post Types Permalink