• Resolved schmacklab

    (@schmacklab)


    U have created a custom post type (as well as a meta box and a taxonomy) with the code below.

    I have created a single post template for this post type called single-portfolios.php

    When I create a post everything works fine. When I preview the post everything works fine and the content is displayed through the single-portfolios.php file. When I publish it all breaks down and the post is displayed through the default index.php file.

    <iframe src="https://pastebin.com/embed_iframe.php?i=gF0dF1Q2" style="border:none;width:100%"></iframe>

    <script src=”https://pastebin.com/embed_js.php?i=gF0dF1Q2″></script&gt;

    Since I obviously cannot seem to embed the code form pastebin here’s a link: https://pastebin.com/gF0dF1Q2

Viewing 1 replies (of 1 total)
  • Thread Starter schmacklab

    (@schmacklab)

    Found this answer:

    Have you tried going into the Admin going to Settings -> Permalinks and saving? You have to do this to flush the rewrite rules after adding any new ones…which registering a post type does by default.

    Thanks to prettyboymp from reddit.com/r/wordpress

Viewing 1 replies (of 1 total)
  • The topic ‘single post template for custom post type woes’ is closed to new replies.