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
- How do I programmatically add items of content to a custom post type?
- Dynamic page.php template for custom post types
- Custom Post Type with Nested Taxonomy and Template Files
- How to allow “Add New” capability of CPT when links to its UI are placed as a submenu?
- Child page in custom post throws 404 page not found
- CPT: archive-cpt.php VS custom page template
- How to make in WordPress admin panel sortable column for the custom field, that count the number of page impressions?
- Custom Blog Post Listing in Genesis Sample Child Theme
- Pull in custom content types into page template
- Output custom post shortcode. Help spot the error.
- Editable content on a Custom Archive page
- Blog page showing same content as homepage
- Need help targeting a custom post type with conditional tags
- Custom post type permalink returns bad url
- get the custom post type title/name
- Get custom post type list for every category shortcode
- How do i calculate the total of values of custom fields in custom post types?
- Custom post type – get_day_link()
- Use custom metabox to update automatically a post after a given date
- get_post_meta not working on publishing
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom Post Conditional for Parent & Child Single.php?
- Different Category system needed for the Custom Post Type
- How to specify a template for a path like http://example.com/something?
- Specifying Mouseover Icon for Custom Post
- WordPress 3.9 not using custom template
- how to remove pages loading with the archive templates
- Loop through custom posts by taxonomy and display the titles in a list, it is repeating 8 times
- Custom post types with categories in template
- Removing full title and breadcrumb header container for a specific post type
- assign different templates to custom post type with homepage loop
- Using Pagination for Custom Post Type and keeps returning 404
- Validate Custom Post Type fields
- meta query not retrieving posts
- CPT Repeatable Fields + Undefined Index
- foreach loop inside the loop creating duplicates in output
- Custom post type draft use wrong template
- Calling a div and content in php?
- Tag template not returning posts [closed]
- Display custom post type from template
- Custom Post Type Causes Error: Warning: call_user_func_array()
- redirect after submiting post for review
- Get only parent post in archive post
- update custom taxonomy custom fields
- Filter taxonomy by CPT
- Prevent header and footer from loading on specific pages with template or plugin
- How do I find out which (page) template file my custom child post is looking for?
- Custom post type order by post_title
- Tell wordpress to show a single page instead of an archive page
- How can I use one instance of page.php to display different custom post types?
- Get meta values from parent post and save in child post
- Templating advice sub posts of a CTP
- PHP Notice: Unidentified index
- Include images from pages in wp search.php results in default wp search
- I want to create an archive and single page for a custom taxonomy for a custom post type
- WordPress loop add heading before first of type
- Featured image in custom post is being disabled
- custom post type plugin – single template
- Custom Search not working
- Custom Post-type not returning the right child_of
- Page template anomaly
- How to make a template for a specific post of a custom post type?