Add unlimited extra HTML content blocks to pages, posts, and custom post types. A perfect solution for layouts with distinct content “blocks”, such as a sidebar or multi-column view. When editing content, the secondary editors appear beneath the usual editor.
Name the new content blocks anything, and assign each block to any of your site’s public post types. Hierarchical post types, like pages, can optionally inherit their content from ancestors (including their parent page); perfect for section wide sidebars. Each block can individually be customized to offer media buttons and the full or more stripped down version of the editor.
Secondary content can be added to your site by using the Secondary HTML Content widget. Theme developers can also call secondary blocks by using the built in functions (see “Installation”).
REQUIRES WordPress 3.3 or newer.
- Install easily with the WordPress plugin control panel or manually download the plugin and upload the extracted folder to the
- Activate the plugin through the Plugins menu in WordPress.
- Define new secondary HTML blocks using the new Secondary HTML Content section on the Writing settings page.
- Start entering secondary content by editing your content!
- Output secondary blocks by using the Secondary HTML Content widget (Appearance > Widgets) or by using the
the_secondary_content()functions in your template!
Theme Code Example
the_secondary_content( 'More Info', 20 );
Prints out content from the secondary block named “More Info” assigned to page ID 20.
the_secondary_content( 'Contact Information' );
Prints out content from the secondary block named “Contact Information” for the current post.
Prints out content from the first secondary block assigned to the current post type, for the current post. Useful in situations where there is only one secondary content block.
I love this plugin, I have used it on a lot of wordpress sites. It worries me that I get an error message in my error log that says “The called constructor method for WP_Widget is deprecated Use __construct() instead”. What I don’t understand that see __construct() in the widget, but I still get that error message. Can anyone shed light on this?
Works as stated – my only issue is that the content in these blocks does not show up in WP Search results.
Contributors & Developers
“Secondary HTML Content” is open source software. The following people have contributed to this plugin.Contributors
Interested in development?
- Fixed a backwards compatibility glitch related to
get_secondary_contentfailing when passing in an integer to identify the old secondary block number (e.g.
- Effectively a complete rewrite!
- Unlimited secondary HTML content blocks (well, up to 100)
- Name secondary blocks anything!
- Full support for visual / HTML modes in the editor
- Full support for custom post types
- Per block settings for media buttons
- New per block option to use a more basic editor
- Filters for developers
- Add up to 5 blocks for pages and posts (configured independently)
- Multiwidget support & specify which block to use in the widget
- Optionally add media buttons to secondary content blocks
- Various other improvements to the code base
- Option to use on pages, posts, or both (only pages before)
- Option to inherit ancestor secondary HTML content on pages
- Many under the hood changes and enhancements