Secondary HTML Plugin Works with Custom Post Types

Secondary HTML is the best plugin I’ve found that will allow separate blocks of content in a page, post and even a custom post type. This is because it uses a widget to display the secondary content making it much cleaner and less buggy then Multiple Content Blocks and some other plugins I’ve tried. Since I’m building many sites with Custom Post Types and Taxonomies I wanted Secondary HTML to work with a CPT. It requires a tiny code edit in the plugin’s code on line 44. It is set to ‘page’ by default. My CPT is ‘work’ so I just swap that out. I haven’t figured out how to have both a CPT and a page working with Secondary HTML but if you can parse the meaning the answer is here.

Original

add_meta_box('secondary_content_'.$i,$title,'secondary_block_box_inner',
'page','normal','high',$i);

Changed with Custom Post Type

add_meta_box('secondary_content_'.$i,$title,'secondary_block_box_inner',
'work','normal','high',$i);
This entry was posted in Uncategorized. Bookmark the permalink.
  1. Andresmijares says:

    Hi Jason, thanks for this post, great stuff!, I’m having a little issue with this plugin that maybe you have faced before, in this page http://www.otoacademie.nl/dev/ I used this plugin to give users the change to add content into multiples tabs like u can see at the button of this page http://www.otoacademie.nl/dev/rijinstructeur-auto-b/ , however the client requires to have those tabs also in the home page, and the plugin is not working in the home page.

    The fact that my other pages are single and this home is a page could be blocking something?

    Also I will need some help with a few projects, I’m full right now, I can see you are good with wordpress, maybe you would like some extra work, feel free to add me via skype :) andrewkthx

    Regards :)!

    • Anonymous says:

      I haven’t tried it but maybe just add the page filter back in in
      addition to your CPT one? (although if it’s that simple it might mean i
      tried it and it didn’t work). I think I saw a tabs shortcode plugin which is where I’d start if I’d needed to do tabs. Getting Secondary HTML  to work with tabs looks pretty intricate. I’d love to see how you managed that. Also, there’s a custom fields template plugin that seems more useable when it comes to putting a theme together (although maybe not as content manager friendly). I don’t go on skype that often but next time I’ll put in your handle so we can chat.

      • AndresMijares says:

        Hey Hi back!

        Well the problem was kind of embarrassing, I had a query calling something else that was causing the problems, sometimes the solutions is so clear that is hard to see hehe, regarding to the tabs, is basically really simple, in a big picture the jquery just fade some divs depends where the tab is, just place a secunday html content on each is voila! easy as that, also I don’t really like to use custom fields for that, since I cannot style em.

        Now for a end user point of view, secundary html content might be not friendly, I would recommend you to give a try to this one http://wordpress.org/extend/plugins/pagely-multiedit/ , so far is working great for me and easier to understand (even for more dummies clients) :p

        Have fun dude!

Leave a Reply