Solved

Adding a default heading to each new Wordpress Post

Posted on 2016-08-18
6
42 Views
Last Modified: 2016-08-22
Hi All

I am creating a knowledge base with about 100 posts and this has come along nicely.  However, when I click to create a new post  would like to add 3 lines of text by default at the top of each post as follows when they are being created.

1) 1st Line of text
2) 2nd Line of text
3) A pull down menu containing the name of the team the post 'owns'

I have searched through the custom posts plugins but most are either years out of date or over complicated for whats required.  Maybe I can add shortcode to put a pull down list into a post when creating it
0
Comment
Question by:IM&T SRFT
  • 3
  • 3
6 Comments
 
LVL 12

Accepted Solution

by:
William Nettmann earned 500 total points
ID: 41762057
You are not clear where the three lines must be - when the post is created / edited, or when it is displayed?

To add three extra fields to the editor, you can either use an existing plugin like ACF or roll your own.

To display them, you would create a suitable template in your theme.
0
 

Author Comment

by:IM&T SRFT
ID: 41762160
Sorry, so I meant as I click the create a new post these 3 lines will display at the top of the post and the author can then continue to type below these.

I will take a look at ACF tonight

Thank you for your advice
0
 
LVL 12

Expert Comment

by:William Nettmann
ID: 41762207
So you want those three lines to be part of the post eventually?
0
Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:IM&T SRFT
ID: 41763630
Yes I want them to display automatically at the top of each new post
0
 
LVL 12

Expert Comment

by:William Nettmann
ID: 41764100
You could possibly do some clever stuff using the "content_edit_pre" filter.
0
 

Author Closing Comment

by:IM&T SRFT
ID: 41764872
Thank you  William,

ACF seems a good plugin, not finished playing around with it yet.

I may go back to basics and simply categorise posts by department / alphabetically

Once again thank you for your assistance.  I will leave the clever suggestion for now until my knowledge and understanding has improved
0

Featured Post

Active Directory Webinar

We all know we need to protect and secure our privileges, but where to start? Join Experts Exchange and ManageEngine on Tuesday, April 11, 2017 10:00 AM PDT to learn how to track and secure privileged users in Active Directory.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to install BuddyPress on your self-hosted WordPress site It’s been called everything from “social networking in a box” to “Facebook without the terms of service,” but until Feb. 16, BuddyPress was a relatively unknown outside the WordPress MU…
Transferring a wordpress site from a host or local dev server to another host can be a pain. So I've included my steps on how I have accomplished this task. Steps include an assumption that you have Cpanel access or Ftp access.. If you do not hav…
The purpose of this video is to demonstrate how to automatically show related posts at the bottom of a blog post in WordPress. This will be demonstrated using a Windows 8 PC. Plugin “Yet Another Related Posts Plugin” will be used. Go to your…
The purpose of this video is to demonstrate how to insert an Iframe into WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Open Page or Post…

820 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question