Tagged: custom post types
- This topic has 12 replies, 4 voices, and was last updated 7 years, 7 months ago by Mahesh.
-
AuthorPosts
-
December 2, 2015 at 11:18 pm #80538MeinhardParticipant
Hopefully somebody can help me. I have created two custom post types (Capabilities posts). For specific posts I want to enable “No Sidebar, Full Width”. I do not find the option. Many thanks in advance Meinhard
December 3, 2015 at 11:33 am #80561SakinKeymaster@Meinhard: Can you post in your URLs for post type and then I can check in if that is possible from Custom CSS or not. As if you have “No Sidebar, Full Width” in default layout then it should work on all post type. But if you want to change for specific post type.
You might need to build child theme.
December 3, 2015 at 11:47 am #80562MeinhardParticipantMany thanks for your quick reply. I use a child theme. I can send you the URLs, but the page is password protected (htaccess), because we work on the site. Is it possible to send you a private E-Mail?
December 3, 2015 at 12:40 pm #80572SakinKeymaster@Meinhard: Yes and no as private email is only for premium support member http://catchthemes.com/membership/. Ok let me check if that is quick one. I will email you in your register email address.
December 3, 2015 at 2:03 pm #80578SakinKeymaster@Meinhard: Try adding following css in “Appearance => Theme Options => Custom CSS” box to make your single product full width and hide sidebar.
.single-product #primary { width: 100%; } .single-product #secondary { display: none; }
December 3, 2015 at 2:31 pm #80579MeinhardParticipantMany Thanks Sakin. It works!! It is possible to do this only for 2 – 3 products??
December 4, 2015 at 2:28 pm #80621SakinKeymaster@Meinhard: Yes, that possible. For that you just find your product post id. If you need help in id then you can install Catch IDs plugin. Once you know the ID, you can add the css like below. The following css will work for post ID 271 only.
.postid-271 #primary { width: 100%; } .postid-271 #secondary { display: none; }
So, if you want to do it for 2 then it will be like this. This is for 271 and 305 postids.
.postid-271 #primary, .postid-305 #primary { width: 100%; } .postid-271 #secondary, .postid-305 #secondary { display: none; }
Same way you can add more and more:
.postid-271 #primary, .postid-305 #primary { width: 100%; }, .postid-305 #primary .postid-271 #secondary, .postid-394 #secondary, .postid-394 #secondary { display: none; }
December 4, 2015 at 3:10 pm #80624MeinhardParticipantMany thanks Sakin.
You helped me immensely.
Many thanks again.December 4, 2015 at 6:20 pm #80633SakinKeymaster@Meinhard: Thanks for you appreciation and if you like my support and theme then please help us by providing your valuable review and rating at https://wordpress.org/support/view/theme-reviews/catch-evolution?rate=5#postform
April 6, 2017 at 6:51 am #113590tesseraltymeParticipantHello,
Here is a simple way to effect the clean box options in custom post types:
Install and activate Advanced Custom Fields Pluginuse the above image to select the field options and names. Below the fields is the selectors for which custom post types you wish to add this group to.
When you edit or create a new page in your custom post type you can select the options from the group. You would want to play around with it to see how it affects your display.
Above image shows the custom post type editor with clean box theme options.
Example custom post type with featured image disabled.April 6, 2017 at 11:39 pm #113627MaheshParticipant@tesseraltyme: Can you please clarify. I don’t quite get what your problem is.
Regards,
MaheshApril 7, 2017 at 8:06 am #113658tesseraltymeParticipantMy reply was to #80538
December 2, 2015 at 11:18 pm
#80538
ReplyMeinhard
Participant
Hopefully somebody can help me. I have created two custom post types (Capabilities posts). For specific posts I want to enable “No Sidebar, Full Width”. I do not find the option. Many thanks in advance Meinhard
I attempted to attach images, but they were not included in my update. They would go a long way to explaining.
First there isn’t a problem as far as I am concerned. I invented the solution to #80538 and wanted to share that capability with others.
Since Clean Box Theme uses custom fields to designate per-page theme options, (such as disable featured image) I simply created the same capability in Advanced Custom Fields Plugin and designated my custom post type for its use. It works perfectly.
It would be an improvement on your theme to provide this feature without additional plugins.April 9, 2017 at 2:40 am #113715MaheshParticipant@tesseraltyme: By default, the theme supports metabox for Posts and Pages, if you want to have it in custom post types too, you’ll need to customize the theme further and add the custom post type in metabox intialization. Check
inc/clean-box-metabox.php
code at the last line. If you are not familiar with coding, I recommend you to hire a customizer.Regards,
Mahesh -
AuthorPosts
- The topic ‘Custom Post Types’ is closed to new replies.