The image above of a tree-lined track is there thanks to the Hooked Editable Content plugin. In fact all the images, sliders and galleries found in that slot on any page or post have been added using the plugin.
I added the track image to this page using the hooked editor which was available to me on the Edit Page screen, below the main content editor. As you can see, it’s just a normal WP Editor, but with the title Hooked Editor: Images after Main menu and some instructions. Using the editor, I could add an image in the normal way, publish the page, and my track image is on display.
That explains how to use the hooked editor once it’s set up. Now let’s see how to create it in the first place.
Hooked Editors can be viewed or added from the main admin menu. The settings I chose in this case are shown below. The title I used – Images after Main Menu – is displayed to the page author above as Hooked Content: Images after main menu. And the description I entered when setting up the editor (see below) is then displayed immediately below the editor title for the page author (as you can see above).
The hook I chose –
hootubix_template_main_wrapper_start – comes with the Hoot Ubix theme this site uses as its main theme. It appears in
header.php in just the right place – after the closing
</header> tag and before the main content. If the theme hadn’t come with a hook in the right place (and some won’t) I could have added one in my child theme.
The last step was to set the permissions. The default is that only Administrators can use Hooked Editors, but I wanted post authors to be able to use this Hooked Editor for their own posts, and I wanted editors to have access to it on all posts and pages. Hence the settings I chose in the side menu.
And that’s me done. Now the page author can add what he or she wants in that section using the full WP Editor, and that content will appear immediately below the main menu – but only on this page.
Before I finish, just one other refinement to mention…
I also added the solitary tree image to the editor titled Generic content (applied on all pages / posts) as shown below.
That means the tree image appears on every page or post unless content is added to the hooked editor of the page / post itself. In other words, the generic content is the default, while the specific content – content added to the hooked editor of a particular page or post – over-rides the default.