Have you ever noticed that you’re constantly required to add the exact wording in all of your posts? Isn’t it exhausting to add the same one-liner or phrase after every single article, blog, etc., on a daily basis.
People frequently accomplish this by encouraging others to subscribe to their feeds, retweet the message, share it on Facebook, and so on. You might always add this with an easy tag right after the content, a person can also simply make that textual content the default content material in your WordPress post editor.
What is Default Content?
Default content can be defined as such a piece of information; it could be a concluding line or a phrase to tell you to subscribe or follow the company’s pages in any type of application, like Facebook, Instagram, Youtube, etc.
You can watch the video tutorial below for this article:
For example: Do check out our other articles and Like, Subscribe, and Share our videos of XXXX company on Youtube.
Why should you even add default content in the WordPress Editor?
- It can save time, whether it may just be a minute, but as we all know, time is quite a precious little thing, so every second counts.
Now, let’s go ahead with the solution to your query.
- Go to your dashboard in WordPress.
- Hover on to Posts.
- Click on the Add New tab.
You’ll see that it’s completely empty. Now, follow the given instructions below.
- Hover on Appearance.
- Tap on the Theme Editor option.
- Click on the Theme Functions on the right side of your screen.
- Further, scroll to the bottom.
- Now, we’ll be adding some codes.
NOTE: Before adding any type of code or making any code-related changes, Make sure that you have the most recent backup of your entire website just in case anything goes wrong so that you can quickly recover it afterwards.
CODE
add_filter( ‘default_content’, ‘my_editor_content’ );
function my_editor_content( $content ) {
$content = “If you like this post, then please consider retweeting it or sharing it on Facebook.”;
return $content;
}
You can change the content or tagline as per your requirement.
- Finally, click on the Update File button.
Now, you can go right ahead and create a new post to double-check whether the code is working or not. Once you open the new post, the default text must immediately be visible to your eyes.
We hope that this tutorial was the answer to your doubt and successfully assisted you in figuring out how To Add Default Content In WordPress Post Editor.
Also Read: How To Remove Welcome Panel In WordPress Dashboard
0 Comments