I am trying to:
Dear All,
Wrong template file.
I have this problem:
I have created a clone of our site in a staging URL and when I create a new template file (single-what-we-treat.php), this file is used for this post type (treatments).
Please check these screenshots:
hidden link
hidden link
When I make the same changes to the live site (creating the template file and then editing the slug of the post type to what-we-treat), I see those warning messages:
hidden link
hidden link
Why does this happen?
Can I edit the template file via phpMyAdmin or via WordPress dashboard so that the correct template file is used (the single-what-we-treat.php and archives-what-we-treat.php)?
Please let me know.
Thanks in advance.
I visited this URL:
https://toolset.com/forums/topic/where-to-change-base-of-type-template-from-single-php-to-a-diff-theme-file/
I expected to see:
hidden link
hidden link
Instead, I got:
hidden link
hidden link
Dear Beda,
Thank you for the prompt response.
I had checked the URL that you mention.
The funny thing is that it works for clone site but not for the live site.
Needless to say, I have created a single-what-we-treat.php file but it is not picked up.
How can I "edit" the template file so single-what-we-treat.php is used?
Regards,
Stavros
Well, it should be used by the WordPress hierarchy, this is basically not really a Types behaviour only.
I need to see that in action.
Can you provide Site Access, with exact links to the Post Types, single Posts, and also FTP details so I can see the file?
It would help a lot if the site would be using only a Native Theme (Child of it, without any customization but the File), and no other plugin but Types.
OK, I have sent you what you asked me for.
If you manage to fix it, please let me know what you changed and made it work.
You do not have any single Field for those Post types configured with Types.
If you see under Toolset > Post Fields, there are 2 groups but those are empty.
So you cannot display any Types fields with that Template - since they do not exist.
You can ignore the message because your template IS applied, you can see this by visiting the Archive and edit the Template as shown in my ScreenShots
Thank you for the prompt response.
I know that the correct template file was used but it was not shown at Toolset dashboard.
I have deleted the 2 empty post field groups and it looks fine on Toolset dashboard as well.
Have you added anything else apart from the "EDITED LIVE" string? If yes, please let me know so I can remove it.
Thanks in advance.
It's because that message says, there are no fields displayed.
It doesn't say, that the template isn't used.
1. Have you added anything else apart from the "EDITED LIVE" string? If yes, please let me know so I can remove it.
No, this is my only edit (once in the Single and once in the Archive file)
2. I assume on the old/other site, you have Types Custom Fields added, and coded into the template?
Thank you, I know, it was just confusing to see the warning message.
I have removed the "EDITED LIVE" string.
This issue has been fixed but I have noticed something else as well.
When I create a new post, I see many new fields e.g. if you click "Posts > Add new" and you scroll down a bit below the SEO tab, you will notice many new fields e.g. banner image, box 1/3 and so on.
Why do those show up at posts?
Please have a look.
Thanks in advance.
Dear Beda,
Please ignore my last message, I have sorted this out as well.
Thank you once again for your help and prompt responses.
Have a great Sunday.
Regards,
Stavros