More

    Add Custom Default Text in WordPress Post Editor

    Must read

    Kindle Vs Nook – Don’t Buy Without Reading This Comparison

    Kindle vs Nook? This is a common question that is marking a steady ground in the minds of the e-readers for whom,...

    Apple One steps up in the bundle battle

    In the latest presentation, Apple revealed the slew of new products like Apple Watches series 6, Apple Watch SE, iPad Air, and...

    Why Is Edge Computing the Unconventional Call Of The Hour?

    The world of computing is not going to stop on Cloud or IoT. A technology shift must manage a large amount of...

    9 Interesting Features Of Arlo’s Smart Doorbell That Will Secure Your House!

    Are you also concerned about the security of your house?  Do you also feel that before opening...
    Add Custom Default Text in WordPress Post Editor 3
    Sreejeshhttps://techgyo.com
    Hi there! I'm +Sreejesh and I am an internet enthusiast. I started writing on this blog as a hobby, now full time blogger. In this blog, I cover topics about blogging, and how to make money online, and also some interesting techy news, tips and tutorials. Checkout archives

    Writing a good content can be difficult, and sometimes confusing to get started , but I knew this can be simplified with a checklist or framework. I wanted to maintain a very  basic and simple blog post framework for myself and something which I can ask my team and guest authors to follow for all future posts. And today I came across a nice article “Anatomy of a good blog post” by Eric Binnion, in his post he shared his framework for writing a good post.

    Yes the lightbulb moment, I found it very useful and bookmarked the page, but then I thought I should do something even better.

    I had some number contributors and guest authors who might have missed the editorial guidelines. I can’t ask them to refer it every time they write a new post. So I decided to find a way to add guidelines or post framework  text as the default content in WordPress Post Editor, so every time someone click on “add new post”, they see the post framework text by default.
    default text wordpress
    I found the trick and below is the trick to add your own custom pretext to WordPress Post Editor.

    To do this, simply open WordPress theme’s functions.php  file and paste the following code.

    // Default post editor text //
    function diww_default_post_content( $content ) {
    	$content = '<p>Enter your default text in here. This will show up when you add new post.</p>';
    	return $content;
    }
    add_filter( 'default_content', 'diww_default_post_content' );

    Replace the text between $content = ”with your custom text, you could even add XHTML code or link codes if you want. Once you are done, save the file and try creating a new post, you should see the default text there.

    Let me know if this tip was helpful and if you know any other way to do the same.

    Latest

    Secure Your Internet With The Exclusive Hacker-Proof Quantum Internet

    Everyone dreams of being 100% sure about the Internet is safe. Unfortunately, the Internet like any other entity is prone to various...

    The ultimate guide to REMPL FOLDER.

    What is Rempl Folder? Windows 10 Updates wield certain Files and Folders to guarantee that any updates launched by...

    Kindle Vs Nook – Don’t Buy Without Reading This Comparison

    Kindle vs Nook? This is a common question that is marking a steady ground in the minds of the e-readers for whom,...

    Guess What Happened After Start-Up Astra Launched Its Rocket In Alaska!

    The first orbital mission by start-up Astra failed as their Rocket 3.1 couldn’t reach the orbit. The rocket...

    Internet Urge! Remote Schooling Out Of Reach For Many Students

    Internet-dependent teaching or online education is the only key to the right education for students of all ages, while the pandemic is...

    More Like This