Reputation: 25
I want to add some texts plus html code to every new wordpress post.
So, is there any solution to pre-define my texts and html code so that whenever i create new post and it already have the text and html code.
for example: I have html table for mobile prices and its one paragraph and i need this each time to add this in every new wordpress post.
So to save the time, Is there any option to add the html table and one paragraph so it automatically appear in every new post.
so that i don't need not have to retype them every time in new post.
Thanks and hope to see your reply soon.
Upvotes: 0
Views: 81
Reputation: 155
you can use default_content filter to do that
add_filter('default_content', 'my_default_content', 10, 2);
function my_default_content($post_content, $post) {
// Do nothing if this is not a blog post
if ($post->post_type !== 'post')
return $post_content;
$content ='<h1>Any predefined content</h1>'
return $content;
}
Upvotes: 1