If you are up to enter same text repeatedly in the post you may automize it. Simply add wordpress default text in Post editor so that when you are up to add a new post the default content will be there already and so you can edit it or add some other text to it.
Add the following code in functions.php
add_filter( 'default_content', 'my_editor_content' ); function my_editor_content( $content ) { $content = "Write Anything here. Ithu Chumma Trailer thaan ma."; return $content; }
The above code will work for all post types. Whether Custom Post type or Post or Page It would show the same text for every one. If you want different text for different contents use the below code.
add_filter( 'default_content', 'default_content', 10, 2 ); function default_content( $content, $post ) { switch( $post->post_type ) { case 'post': $content = 'Default Text For Post'; break; case 'page': $content = 'Default Text For Post'; break; case 'Movie': $content = 'Default text for Movie'; break; default: $content = 'Default Text for Other Post Types'; break; } return $content; }
Linux has a convenient feature of running cronjob which will get executed at the correct…
As famous Tamil poet Auvaiyar said "Katradhu Kai Mann Alavu, Kallathathu Ulaga Alavu" which is…
Terraform Cheatsheet with pdf. You can download Terraform Cheatsheet pdf with all Terraform CLI commands…
I was planning to do Terraform certification a long time ago. I have worked on…
As a user of both of these services has got multiple benefits with both of…
You need not memorize these important docker commands. Repeated usage will make it easy for…
This website uses cookies.