Try this for the loop code.
<?php
$paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
$loop = new WP_Query( array(
'post_type' => 'music',
'paged' => $paged
) );
?>
Related Posts:
- Where is get_header(‘shop’) file in Woocommerce templates
- How did you incorporate WooCommerce in your own WordPress theme?
- Creating a custom category page with pagination
- How to remove wp_link_pages() from template
- Show all parts in multipage post
- Unable to display pagination links on custom category template
- Get URL of current post but not the page number
- How is WooCommerce cart.php template supposed to be used?
- Pagination issue with tag.php
- /wp-admin/post.php shows 404 template on submit
- Can index.php take over for front-page.php in template hierarchy on second page?
- template with multiple post loops for multiple widgets [duplicate]
- Add pagination to blog
- changes to templates not showing on server
- Custom template pagination
- The default code for “posts_nav_link” on category.php isn’t working
- How to preserve changes in templates and other files
- How to display (plugin?) output on a single page (not a widget, probably not a short code) – template, plugin, combination?
- Is there a way to create a block template that is not limited to a post type?
- Having trouble with Template hierarchy. I Need to create a set of pages that drill down from states to specific locations
- Facebook Messager Plugin
- Use same page template for parent and child pages in a theme
- displaying category and subject posts
- How can I hardcode template selection?
- Advanced Custom Field DatePicker [closed]
- Plugin dropping pagination variable
- How to duplicate a page template but make minor changes to the header?
- global variables in templates
- Use of Templates in a Plugin
- Changing layout programmatically
- Add comments for template variables
- Create a multisite network for an existing installation
- Template administration Error after WP 4.8 update
- How to identify which template WordPress’s default search-form retrieves in my theme
- Adding Query to Custom Page Template
- Whats the template of my homepage?
- Markup is visible when I view sample data from my template
- admin-ajax.php warning max input vars exceeded on layered pop plugins [closed]
- how to use in custom single.php template using php?
- if page is parent page redirect to first child with hook / polylang
- How to show only next post pagination link using wp_link_pages()
- 301 (static page instead latest posts)
- Reoccurring 404 Errors on all subpages
- How to use same page template if post status other than ‘publish’?
- Custom headers based on taxonomies
- Real Time Page Template Preview in WP Admin [closed]
- link to non-category page routed to category template
- Custom template bypassing to pager to index.php
- Custom templates vs page-slug
- Can’t format content of Rich Text Editor in Template
- Render custom php template into string
- get_file_data to read data for Custom Template File?
- Perform internal redirect in WordPress?
- How WordPress is able to change locale without using setlocale
- Is there a directory my plugin can write files to that cannot be viewed via the browser/url?
- Page attributes missing
- get_template_directory() still returning path to previous theme
- How to change header image size in custom themes
- Remove Items from Template Homepage
- WordPress Not Using Template Files After Permalink Update
- plugin links not working [closed]
- Different Template based on HTTP Referer
- Bizarre issue with custom RSS template
- Where is Number of Posts Set?
- URL / Templating system advice [closed]
- How can I force URL of a custom post type archive to use a page template?
- How do I override the search template in a plugin?
- Possible to have one template call different sidebars for different pages?
- Woocommerce Show Single Product on Homepage
- Best practice to update the file header.php
- page-{slug}.php vs. template-{slug}.php
- Understanding the Template hierarchy
- Is there any hook for theme activation ? or something similar?
- How to use get_template part in the plugin?
- How does WordPress choose archive type template?
- What’s the purpose of $wp_did_header?
- Redirect to another page using contact form 7? [closed]
- Footer.php not showing?
- Override Dokan Includes File in Child Theme
- changing posts layout in ultimate member profile plugin
- How to properly Remove certain CSS / JS files from template
- Template filter for custom taxonomy terms
- How to put limit on slider
- How to publish a Page and Posts using single template
- What is the most efficient way to create multiple versions of the same template?
- What are the main parts of a WordPress Template?
- Remove .htaccess portion upon plugin deactivation?
- Is there any way to write custom HTML is some .php file and then call it wherever necessary?
- WordPress add_rewrite_rules for custom URLs ending in .html
- Using shortcode in template file
- How to redirect my custom template page to content-none.php if no posts found?
- Display current category and child
- Return get_header and get_footer string instead of echo it
- how to force tag page layout to use same as search layout?
- pagination on data fetched using SQL query
- Are there any downsides to not using get_header(), get_sidebar and get_footer()?
- wp_enqueue_style and different styles for blog template
- How to get link to homepage
- Different templates for same content, landing page from different URLs (generic, simple)
- Use one template only for custom post type archives?