Solved

Adding a default heading to each new Wordpress Post

Posted on 2016-08-18
6
38 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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…
Wordpress Horizontal Drop-Down Menu In this tutorial I will show you had to add a WordPress horizontal navigation menu to your theme. I have searched and searched for a good tutorial on creating a WordPress nav menu without adding a plug-in or us…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

943 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

Need Help in Real-Time?

Connect with top rated Experts

4 Experts available now in Live!

Get 1:1 Help Now