Custom Post Types

Is there any way to separate the template that custom posts can use and what the blog posts use? The problem with using css to display none the sidebar and remove meta information is that it still loads in the source and screen readers pick it up, which makes for a very confusing layout.

I’ve asked before, but what are the files under views that I would need to duplicate to create an independent template for my custom posts. To be clear, I just need to know what files to look at. I should be able to take it from there.

thanks

Hi There,

Thanks for writing in! I’m sorry, but I could not understand your actual issue here. Is it possible to provide us with a test page URL along with some screenshots if possible and explain what you’re trying to achieve, so that we should be able to assist you accordingly.

Thanks!

It would be very helpful if Themeco would simply provide a set of template files for custom post types. In many of the requests similar to this the response from support is for a CSS fix but that is not always ideal as in this situation.

Hi,

Instead of creating template files, you can remove your custom post type sidebar and post meta completely by adding the code below in your child theme’s functions.php file.

function make_full_width($layout) {  
    if( get_post_type(get_the_ID()) == 'x-portfolio')) {      
       $layout = "full-width";
   }
  return $layout;
}
add_filter('x_option_x_layout_content', 'make_full_width',999999);

 function x_integrity_entry_meta() {
     return;
}

Change x-portfolio with your custom post type name and change integrity with the stack you are using.

Hope this helps

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.