Jump to content

Archived

This topic is now archived and is closed to further replies.

sethoof

Custom Post Type as a Template?

Recommended Posts

sethoof    3
sethoof

I am playing around with some custom post types and have noticed that any changes I make to the structure of one post is then carried through all other post types.  Its like the post type is a template.  Is this just they way DMS works or is this possibly due to the custom post type plugin I am using. 

 

I am using Custom Post Type UI - https://wordpress.org/plugins/custom-post-type-ui/

 

If anyone knows a custom post type plugin that can create custom posts and also edits custom fields in the post in an automated way, I would be really keen to use something like that. 

 

Thanks!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi,

 

I have just this moment create a Movies CPT and when I make a change to the movies single movie and made it full width - https://cloudup.com/cY_EBQvj7Jl

I then go to my standard post type (blog) single post and change the layout slightly i.e. comment form on the right, these changes do not effect the movie post type.

 

https://cloudup.com/cbahhe1aEgg

 

If you want to create custom post types and use custom fields, you should check out the following plugins.

 

http://wp-types.com/ ~ Link has both Types and Views.

http://www.advancedcustomfields.com/ ~ ACF is an awesome plugin


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
sethoof    3
sethoof

Thanks for the links, Danny.  The problem I am encountering is that one change to one CPT effects all other posts in that CPT group.  To use your example, a change to the structure of the Hobbit page will take effect for all movies (i.e. Lord of the Rings, Lethal Weapon, etc.).  So if you moved that comment over on the Hobbit page, does it also change for all other movies?  This is what is happening with me.  If thats just how it works, no problem.  I will come up with a workaround.  But I wanted to make sure this is normal and not something on my end.   

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Ah OK, so you want to have a different layout per post type in the case of my example, a different movie layout per movie, is that correct. If this is the case, then this is something that has come up as its not currently possible.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
sethoof    3
sethoof

Yes Sir!  That's exactly what I was looking for.  Good to know its not just me.  I will adjust my content planning accordingly. Thanks, Danny!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

I have added this to our tracker as a feature enhancement.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
dboll    0
dboll

Danny Will this be added soon? My website's structure relies entirely on custom post types. I was unaware that DMS2 could not handle custom post types in this way. Custom Post Types have been fully supported in WordPress for a while now, so it'd make sense if a theme as advanced as DMS2 could utilize them fully.

 

If this change isn't added soon, then I will be forced to completely restructure my website, which I definitely don't want to do.

 

If at all possible, please provide a time frame for having the custom post type template changing issues fixed. Thanks!

Share this post


Link to post
Share on other sites
GetMeWebDesign+    115
GetMeWebDesign

dboll I have used different layouts for different custom post types without any problem (Using Custom post types UI)

Additionally, if there is afeature like a gallery, I use the hide on this page facility under standard options, if I dont require it on that custom post


Chrome Developer tools - please use them. If you are not sure how, then it is easy to learn

Be inventive in your keyword search of the forum ie Navi > Navbar > menu > tabs > font > color. Your answer lies there somewhere!

Share this post


Link to post
Share on other sites
dboll    0
dboll

GetMeWebDesign Everything works fine for me as well with Custom Post Types UI, on the surface that is.

 

The problem is that whenever you change any part of the template that you are using for a custom post type, every other custom post type is also changed. It doesn't matter if you unlink/unlock, save as new template, etc. - all custom post types are always changed no matter what. That's what my problem is (all of my custom post type pages need to be slightly different from the others).

 

Have you found a way around this?

Share this post


Link to post
Share on other sites
GetMeWebDesign+    115
GetMeWebDesign

dboll Oh see what you mean. If you made changes to a highlight section for instance. In which case, no I cant do that. I rely on using wp content loop for changes like that and then hide generic features that apply to some but not all posts


Chrome Developer tools - please use them. If you are not sure how, then it is easy to learn

Be inventive in your keyword search of the forum ie Navi > Navbar > menu > tabs > font > color. Your answer lies there somewhere!

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

dboll Are you saying that if you make a change to one Custom Post Type lets say Movies, these changes are also displayed on other custom post types such as Books ?

 

Or are you referring to what I mentioned above where you want to have a different layout per different individual custom post types such as Movie (for example) ?


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
dboll    0
dboll

Danny I'm referring to the latter 

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

OK, well for individual layouts on a single post type has been reported to our tracker.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
evscicats    14
evscicats

Danny - Is there an update on this topic?

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

There still isn't support for individual templates working on single posts or post types at the moment. Our developers are aware of this.


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
evscicats    14
evscicats

Thanks Danny.  I have been trying different plugins to get this to work without success.  Was curious how close it was to being a feature... hopefully soon.

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

It would be unlikely that any plugin would allow you to do with DMS unless it was built specifically to do so, as DMS templates are not the same as standard WordPress templates. In regards to when this will be implemented, I am unable to say as our developers do not give roadmaps. :(


Please search our forums, before posting!

Share this post


Link to post
Share on other sites

  • Similar Content

    • art23130
      By art23130+
      I have uploaded a file shoing missing sections for Custom Post Type
      It is OK for categories and tags but not for a single post types. 
      This is the link. 
      https://www.geoinformation.com/geocode_library/10-10570-rsg-2016-003/
      Any idea?
      thanks 
      Binder1.pdf
    • Jared Smith
      By Jared Smith+
      I haven't figured out how to get the "Sync Loaded Item" option in templates menu of Platform 5 to stay checked. It doesn't give me an option to save settings when I select it, and when I select it then click off the editor, it unselects. Also if I select it before loading a template, it doesn't stay checked there either.  Whats going on?
    • Queue-it
      By Queue-it+
      Hi,
      I created a Pagelines template for a "Post type" post. Whenever creating a new post page it firstly display that template post and I have to manually change it in the scope from "All of type posts " to "Current page". 
      Is there a way to fix that? 
       
       

    • richardjacruz
      By richardjacruz+
      I'm building a website in a dev environment at http://162.144.182.17/~uescocra.
      I want to import a bunch of products, and then have the products have a different template than the default template. 
      I also want to change the default template for blog posts.
      Before I go making changes, can I do this where the post type of "products" has its own global template, and the same with blog posts?
      For instance, in a product I might want to have a widget for categories, similar products, etc., and in the blog I may want list of the latest posts, blog categories, link to an email sign-up landing page, etc.
      Thanks.
      Rich
    • abuzzelli
      By abuzzelli+
      Is there a shortcode or a way to automatically pull the site name into the footer or elsewhere?
×