Support » Fixing WordPress » Permalink Post with Header and Post ID without header

  • HI

    I want to be able to use these 2 types of permalinks for POST but with different templates ?:

    website.com/?p=ID
    website.com/my_post_page

    Both of these link would be the same POST but depending on what URL you view it from will display FOOTER and HEADER or Not.

    The reason for this, is I want to display my wordpress POST in an IFRAME within our crm admin.

    Any help would be greatly appreciated.

    Thanks
    James

Viewing 4 replies - 1 through 4 (of 4 total)
  • If I’ve understood correctly:

    if you are using two different templates and creating two identical posts in each template, you should be able to ask each template to call different headers and footers.
    You’d still need a header for your head tag details (CSS etc…) but could leave the other content out and leave calling the footer out in one template.

    Thread Starter zoik

    (@zoik)

    Thanks Judgerookie

    how would I pull different header or foot?

    I tried to create a new template page called “category-ID.php” /category/News/
    Which pulls the blog category NEWS but I couldn’t workout how to display the URL so it was something like this:

    /category/News/my-news-story-today

    and the normal blog url which uses single.php (i think) would look like this:
    /my-news-story-today

    I’m not sure if im on the right track.
    Sorry

    Thread Starter zoik

    (@zoik)

    Hi again

    I just thought of another idea – not sure if its any good, but it works.

    I create a date.php template. This way i can call the post URL by the DATE and set a different template.

    URL WOULD BE: (TEMPLATE date.php)
    website.com/2017/10/21/

    Which would be the same as:(TEMPLATE single.php)
    website.com/my-news-story-today

    Thanks
    Jim

    I think you’re on the right track.

    These may help explain better:

    https://developer.wordpress.org/themes/template-files-section/page-template-files/
    http://www.wpbeginner.com/wp-themes/how-to-create-a-custom-page-in-wordpress/

    The idea is that you can create as many styles of page templates as you want and get the page to call whatever it is within, for example sidebar.php or content.php / sidebar-newlycreated.php or content-newlycreated.php

    I think you may have worked this out but just in case.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Permalink Post with Header and Post ID without header’ is closed to new replies.