There’s the core function add_*/get_query_arg() that you can use to append stuff to the query and retrieve it.
So simply add a link somewhere, that points to your custom post types single.php template
single-{$custom_post_type}.php
Then append the query arg which would be ?wpse_meta_key=wpse_some_val and then do a switch on top of your template:
if ( 'wpse_some_val' === get_query_arg( 'wpse_meta_key' ) )
{
get_template_part( 'special_query_template' );
}
else
{
// do default stuff
}
Related Posts:
- How to include template according to meta post value
- get_post_metadata() undefined when used in loop in RSS template
- Mysterious template change after database import/export
- Where is get_header(‘shop’) file in Woocommerce templates
- WP frontend output of custom textarea fields not respecting line breaks. In admin it’s OK
- Custom reset password template after forgot password request
- Child Theme: how to override variables?
- How to create tag.php
- Get template part vs locate template function
- Tools for Converting an Existing Website Design to a WordPress Template?
- author.php added to template not working on Nginx server
- wordpress – load a template based on the URI
- Using Includes in Templates in Document Head
- How to show scaled featured image in template?
- Load template inside a parent template
- Child theme TEMPLATEPATH issue
- Unable to create custom search results template page
- Updating modified templates
- Template for slug
- Hook to get the page template that is in use on the admin page edit screen?
- “Issues” loading MANY featured images on a single page (custom template)
- WordPress Shortcode wrap around div
- How to add an HTML tag to the Header?
- Where is the template for the ‘standard’ format of a post in the theme twentythirteen?
- Change post_date to post_modified date on post template?
- Missing ‘Page Attributes’
- how to use custom page template in a page?
- include ‘wp_enqueue_scripts’ (CSS) to multiple templates
- Is there a way I can put my post templates in a separate folder?
- new page sidebar-template by default
- Get link to a specific template file [closed]
- Default Template Selected After Changes in Elementor [closed]
- Include Custom Style & Script into Custom Post Type Single Template
- Standard WordPress Search does not work / Search-results are not displayed / Custom template
- How to preserve changes in templates and other files
- Adding Query to Custom Page Template
- Whats the template of my homepage?
- Custom headers based on taxonomies
- What’s the purpose of $wp_did_header?
- Override Dokan Includes File in Child Theme
- How to get link to homepage
- How is WooCommerce cart.php template supposed to be used?
- Two exact templates, sidebar showing in one but not the other
- Trying to display short code content in template file with do_shortcode()
- Unable to add template to page set as Posts page in WP V 4.6.1
- Taxonomy term page going to 404
- How to use index.php as a template for archives?
- How can I use default CPT templates from sub-folder?
- How to customize WooCommerce templates to avoid override upon update [closed]
- Creating new content types (Pages, posts, testimonials, tigers, oh my!)
- How to set page title tag in custom template for non-Custom Post Type?
- Way to use one template but be able to call different top graphics?
- Differnt page template for page 2 of blog feed
- Page header on specific page is different from the rest [closed]
- Can a link in WordPress contain a query string that is picked up as $_POST
- How to implement my custom development multiple PHP page work into WordPress?
- Is it possible to access plugin data from a custom feed template?
- How can I get all archive-URLs to use the same template?
- Index template always follows page_template() template?
- How to use a template file to show all post having same metakey
- Automate configuration after new/hosted installation
- WP overwrites my setup_postdata() setup
- wp_list_authors() returning the wrong member url
- Modify just ONE page based on a template
- which template does wp_ tag_ cloud point to?
- Pagination problem (plugin wp-pagenavi) with a custom post type?
- Add an anchor link to a ‘plain’ HTML file, without over-writing the entire site?
- Template part including not working
- Parent/Child themes – both CSS files loaded
- Child theme enqueueing style.min.css not style.css
- Exclude certain template from wp_list_pages
- front-page.php includes a placeholder text field. How to get rid of it?
- Display a custom 404 page without a redirect
- Why wordpress custom template comments shows Undefined index?
- Update body class based on theme as well as a html attribute
- Template and URL parameter problem
- get_users by role returns all users
- Validating Error with submit button
- How can I alter a post?
- What is the purpose of the $before and $after arguments on the the_title() function?
- Why is this array not working?
- Remove ” Browse Category : ” from Archive title
- When to use content-pagename.php?
- Using external file with WP_USE_THEMES set to false causing 404
- Current URL path variable
- How to install a wordpress website template on an existing website?
- Custom Archive with Content for Custom Post Type
- Why is my no-results.php template moving my sidebar and footer into the main container?
- Given a page ID, how to display entire page (header/content/footer/sidebars) from a plugin hook
- Implement HEAD and TITLE tags with DB DATA
- Custom Post Type Trouble
- files disappearing from template
- why does blog page ignore template [closed]
- How to change post template
- WordPress template restored by mistake
- Unload templates; disable parent Template Parts using only “theme.json”
- In 2016 theme, how can I force all single attachment posts to use content-attachment.php rather than image.php?
- WordPress “Blog” template hierarchy
- How to force a Custom Post Type template by filename
- order archive page by title in wp twenty twenty-four template