Meta-box above WordPress editor
Sometimes it makes sense to have a meta box below the title box, but above the text editor. For example when you want a subtitle below the title. Or when the layout of your website has a picture between the title and the content. This was my case for a website I'm building for someone. It took me some googling to find out how to do this for WordPress 4.0 and above...
Thanks Stackexchange.com I found it.
The solution
It's actually very simple. Let's create a metabox first. I pressume you know how to do this. If you don't, there are many tutorials out there, that's how I learned it.
Lets start with the meta box I created for pages:
The important part is line 8. This is where you specify where the meta box would render on post.php. You would choose between Normal, Advanced or Side. In this case we make up our own type. I choose Up, seems to make sense for me 🙂
Now WordPress doesn't know where to place a metabox of the type 'up', so let's inform WordPress what to do.
14 15 16 17 1819 20
After this the meta box of the type 'up' will appear between the title and the TinyMCE editor. And that's all!
Ofcourse you still need to write the code of the content and saving action of the meta box, but if you don't know how to do this it's easy to find using google. Maybe one day I'll write my own tutorial about it 😉
 
 

 
 




 
  
  
 
 
