It looks like you’re checking if you’re on the mobile_photo
post type archive with this line:
<?php elseif ( is_page_template( 'archive-mobile_photo.php' ) ) : ?>
If that’s indeed the case, use is_post_type_archive( $post_types )
instead:
<?php elseif ( is_post_type_archive( 'mobile_photo' ) ) : ?>
Related Posts:
- Custom post type is_singular condtional not working when managing sidebar display
- Setting a custom sub-path for blog without using pages?
- Add Content to Page without shortcodes
- Loading custom page template via plugin
- How to quickly switch custom post type singular template?
- Clean URL permalink for custom post type
- Custom post type loops with different page templates
- Custom Post Type .current-menu-item not applying on Custom Post Type Archive Page
- Create second custom 404 page for selected post type
- Help with CPT template pagination
- Custom Post Type Taxonomies -Posts not showing in Category or Tag pages
- Create Template for Custom Post Type same like for Page
- Using wordpress template tags within an array
- how could I load a different template part by page
- Filter widget outputs
- Custom post type pages return 404 page?
- How to get the current category with custom posts
- Template code to split a post and print a custom field?
- Custom permalink structure for remote content pages
- How can I allow users to edit text that will be displayed on a custom post type archive page?
- How to change Elementor Template for Single Page Post on Load
- A certain theme is forcing it’s singular post layout
- Load info from customposttype into template page
- Accessing download link from the loop with WP Download Manager Pro
- Set a template on a custom post in the plugin
- Question on templates
- Custom post type option page template
- How can I load Template file from wordpress plugin
- How can I find out what template is my custom post type using?
- Loading a template for a URL pattern
- Why isn’t my custom post type using the corresponding custom post template?
- Can not hook into custom post type template with: is_page() conditional?
- Custom Homepage As Single Page or Custom Post Type?
- Using custom post types within a section of a template
- Dynamically change Custom Post Type Template OR Change Permalink?
- Custom Post Type Template Based on Page Slug?
- PHP Button Custom link [closed]
- using a template for more then 1 page
- Output custom post shortcode. Help spot the error.
- How to count custom post types with conditional operators
- Editable content on a Custom Archive page
- Using custom page templates with plugin [duplicate]
- WP_Query is printing out only one post when posts_per_page is set to multiple
- WP Query to displaying date and posts for that date?
- GravityForm: Populate Dropdown with custom post type [closed]
- Return array of categories to php function for current post
- Trying to edit the single page from a Custom Post
- Link users to a custom post type
- Create a random unique 6 digit number as custom field for custom post type
- How to output wordpress custom tags separated by comma?
- Can I make WordPress use a custom template for a child page
- Loading all files within a directory
- Blog page showing same content as homepage
- if custom posts type exists and there are posts load script
- Troubles with making a custom template for posts
- Using several custom fields as custom post title
- Custom Post Type without an archive page
- How to enqueue CSS and JS only on specific template?
- Get rewrite slug of custom post type in template
- Show Different Header on a Specific Post ID
- Get Post Primary Category
- Weird problem happening with custom taxonmy when creating/updating posts
- How to show the archive / post type description on Single templates
- Custom Template 404 for specific custom post type
- A good strategy to print custom posts (offer) that are checked inside the metabox of a post?
- Admin notice not displaying
- Can’t get order_by meta_value_num to work properly
- Create custom post type on successful woocommerce order [closed]
- Need help targeting a custom post type with conditional tags
- Why would this IF statement not work? [closed]
- Plugin templates in which directory
- Adding custom tables to WordPress
- custom comments on specific post type
- Taxonomy Archive: Display only one post per term from separate custom taxonomy
- Excluding custom post types
- Very Slow Page – How to Optimize # of Queries?
- Dynamic page outside WordPress
- Creating a Page to View the List of Posts for a Custom Post Type?
- How to load a template without it being assigned to a page/post?
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- Getting the URL of the parent page
- Custom query to filter posts that have current post as a taxonomy [closed]
- Include custom post type single template, but respect theme override of template if it exists
- Custom post type permalink returns bad url
- Change archive page template using pre_get_post
- Custom template with CPT doesn’t display on frontend
- Custom template page with custom archives listing by user
- Custom post type not using custom template
- Return the thumbnail meta data for getter and setter
- Custom Post Type template stored in plugin folder not showing in post attributes dropdown
- How to display selected taxonomies by their parent
- Custom Field Order by Last Name and First Name
- Pagination for custom php code
- get_posts of Custom Post Type AND Custom Taxonomy
- Custom Page that comes with preloaded content for the user
- What’s the difference between same wp functions get_posts(); functions in different form?
- Set up Custom-Post-Type Author Archive
- Changing number of posts per page on CPT-archive.php, have tried 20-30 code chunks so far
- Custom Post Type Loop throws 500 error when used in widget
- how to check if custom post type column already exists?