Support » Fixing WordPress » Link to a page with the_permalink and make it use a specific template

  • Hello,

    I am using custom post types and custom fields in my template.

    I have one summary page which links all my other custom pages using the_permalink()

    I want the page it lands to use a specific page template which is drastically diffferent than the default page template and uses many custom fields. These pages are custom post types (Sales)

    I see this working 2 ways.
    a. I figure out how to make the_permalink() link to a specific template
    or
    b. I figure out where in the content loop to add a conditional statement

    if ( post_type_exists( 'Sales' ) ) {
       echo 'Display my custom fields';
    
    }

    I thought b, would be the way to go, So I opened up content.php and added the IF statement right above
    the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘asset’ ) );

    But that is not working 🙁

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Link to a page with the_permalink and make it use a specific template’ is closed to new replies.