Auto create post title in admin

the_title filter filters the existing title when it’s output on the front end. If you want to set a title when a post is created on the back end, you want to use the title_save_pre filter: function wpa65253_time_title( $title ) { global $post; if ( isset( $post->ID ) ) : if ( empty( $_POST[‘post_title’] ) … Read more

How to modify a title tag in genesis?

Try this to create your custom titles. remove_filter( ‘wp_title’, ‘genesis_default_title’, 10, 3 ); //Default title remove_action( ‘genesis_site_title’, ‘genesis_seo_site_title’ ); //Genesis Extra Stuff remove_action( ‘genesis_site_description’, ‘genesis_seo_site_description’ ); //Genesis Extra Stuff add_filter( ‘wp_title’, ‘genesis_default_title_new’, 10, 3 ); function genesis_default_title_new( $title) { $title=”Hello World!”; return $title; }

Change all Post titles into [Title Case] format

EDIT: WP Title Hook Ok, so if you’re using wp_title (which you probably are, it’s default) that function should have two filters in it you could use. The first one is wp_title_parts, which returns your title broken up into an array. function wp_title_capitalize( $title_parts ) { // Only uppercases the words of the first element … Read more

Wrap h1-h6 in a div

Try this code function wrap_heading_with_div( $content ) { $heading = ‘/<h\d.*?>(.*?)<\/h\d>/ims’; $wrapper=”<div class=”title”>$0</div>”; $content = preg_replace($heading, $wrapper, $content); return $content; } add_filter( ‘the_content’, ‘wrap_heading_with_div’ ); Live Demo

Single_cat_title() print the title before text

Set the display argument of the function to false. <h2> <?php if (is_category()){ echo ‘Category: ‘ . single_cat_title( ”, false); } ?> </h2> Or, to use the function in its more “helpful” form you could do: single_cat_title(‘Category: ‘); If the display argument is true, WordPress automatically echoes the content on to the page usually within … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)