Simply add following code to your theme functions.php
function better_default_post_content( $content ){
if( empty( $content ) )
$content = "Default Template is here!";
return $content;
}
add_filter( 'the_editor_content', 'better_default_post_content' );
With “the_editor_content” filter you can filter WordPress TinyCME editor value for changing values. In this code i added a filter for that.
It’s so simple if you know WordPress action filters. you can read this for action filters: http://wpcandy.com/teaches/how-to-use-wordpress-hooks/
Related Posts:
- Stop WordPress Wrapping Images In A “P” Tag
- How to add an admin notice upon post save/update
- How to mark articles as read?
- Ajax Load More Posts in Category Page
- How does one reduce the number of stored revisions?
- How to Group Posts by the First Letter or Number?
- WooCommerce – Create Products Programatically [closed]
- Search not working with title and content
- Show the title of the latest post by author
- Developing a secure front end post editing form
- I’m having some issues with previous_post_link() and next_post_link()
- Specify number of posts in my ‘tax_query’
- Add a custom option to a page in backend
- Where is the “ancestors” post object attribute?
- How can I display a specific user’s first published post?
- Show all post titles
- How to show a full post, not just an excerpt
- get selected post using $_GET
- Can a page_id and a post_id be same?
- WordPress Theory Lesson – Image Columns within posts with alignment?
- How to hide first gallery for every post?
- How to display related posts by subcategory and not parent category
- Uppercase first sentence in every post
- Limit popular posts by days
- Is it possible to create a form post wordpress custom navigation link?
- creating front end image uploader that uploads images as posts
- How can I sort posts by the date and a custom meta field?
- How to verify wp user password by sql query in wp? [closed]
- Get ALL post ID’s export list (Only id’s. Php or sql not important )
- Cannot get $post object in name_save_pre hook
- Meta value does not save for scheduled posts
- How can I check if a var is equal a translated label?
- Update Modified date when scheduled posts get published
- How to display links in specific page
- Get all images in post and comments like Twitter before post title
- “Right Way” to make custom Loop respect reading settings inside admin panel?
- WordPress does not output “post” class when calling post_class() function
- How to check if single.php has already called the_post_thumbnail function
- WordPress query_posts by tag doesn’t work anymore(?)
- why does wordpress ignore the post args?
- obtain the author id given the post id
- Get current post data into array?
- Delete all drafts?
- How to get current post ID in functions.php
- Post list display year wise
- How can I add a box to edit Order on a regular post?
- How to add automatically bootstrap 4 order-lg-1 and order-lg-2 classes for columns in foreach loop based on the count?
- WordPress 302 Redirect to Random Product/Post/Page
- Sort by last word in title
- How to call posts under a specific category on static front page?
- Image on rss feed on post
- Using AJAX and PHP to load next post object
- Post Status Frontend Announcement
- When WP_Query only returns 1 post, how do I automatically redirect to that post?
- When using Tribe Events Calendar, querying for a specific event category returns nothing
- If post exists, make it a comment in existing post with same name?
- sort posts by getPostViews in functions.php
- Making a wordpress page print friendly
- Use Post as Front Page
- Possible?! A contextually titled back link
- Post navigation using date
- Error while excluding a post from another loop (using its ID)
- definining own teaser text for post
- I need to create “View Profile” and “Edit Profile” links by incorporating the Post Title/ID, but can’t seem to manage it
- How to order posts in WordPress by date?
- How to remove special characters in post title
- Search results with pagination not working
- My post permalinks are redirecting to the post archive page for some reason?
- How to retrieve all meta data directly from the $post object? Such as $post->related_topics?
- Exclude posts in a category on one page but show those posts on a different page
- Hide or remove custom post status
- How to use two query result together in one loop
- custom post single page
- show loop id post , only first id can read
- How can change header text in post careate/edit form
- Loading posts outside wordpress
- Difference between modified post and new post
- Disable archiving of old posts?
- Customizing individual images on posts
- Allowing Users to Delete Their Posts
- How to add a class to links inside posts text
- Query post category & remove any post id
- Converting Posts to Pages
- Changing a field value on submit using a PHP variable
- How to prevent people from seeing an attachment to a scheduled post that’s released in future?
- How can I access my posts on my wordpress site, now I’ve lost the domain name for it?
- Page not loading content – Body archive – page
- Featured Images link to post parent
- External link not showing on post but showing on comment
- Why is $_POST Empty in Profile Edit Admin?
- TCPDF and permalinks
- How can i show only 30% of the “the_content(“More…”)”?
- wp_query select if have comments
- How do i put a dropdown list of ALL my post in the sidebar menu?
- How remove “recent comments” title without modifying code? [closed]
- Return All Post from publish to draft [duplicate]
- Get posts after calculating meta key
- Articles show some of text [duplicate]
- How to make post stick to its own div
- Numbers of new post since the last visit of user