Solved

Adding a default heading to each new Wordpress Post

Posted on 2016-08-18
6
41 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

WordPress has made it easy to create scalable sites based on their powerful CMS, but as great as WordPress is, there are some SEO issues that haven’t been addressed out of the box.  Fortunately these problems can be solved with a few plugins.  The f…
In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…
The is a quite short video tutorial. In this video, I'm going to show you how to create self-host WordPress blog with free hosting service.

776 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