Remove post title

WordPress does not require entering post titles, at least not in the backend. You can leave that part of the form blank. As far as your theme is concerned, that will depend on the theme author and whether they’ve considered someone not entering a title. The default twentyeleven theme handles it fine, linking to the … Read more

Adding schema.org itemprop to WP4.1 Title Tag

If your theme is using add_theme_support(‘title-tag’), then you can try the following: remove_action( ‘wp_head’, ‘_wp_render_title_tag’, 1 ); and then just hook in your own modified version: add_action( ‘wp_head’, ‘wpse_render_title_tag_with_itemprop’, 1 ); function wpse_render_title_tag_with_itemprop() { if ( did_action( ‘wp_head’ ) || doing_action( ‘wp_head’ ) ) { printf( ‘<title itemprop=”name”>%s</title>’ . PHP_EOL, wp_title( ‘|’, false, ‘right’ ) ); … Read more

How to echo a different title to the page if it’s opened on an android mobile phone

I’m not sure where this php_browser_info() function comes from. You can try the following instead: /** * Modify the front/home page title for Android devices */ add_filter( ‘wp_title’, function( $title ) { return ( is_front_page() || is_home() ) && isset( $_SERVER[‘HTTP_USER_AGENT’] ) && false !== stripos( $_SERVER[‘HTTP_USER_AGENT’], ‘android’ ) ? ‘Test Android’ : $title; }, PHP_INT_MAX … Read more

Add anchor text to php

You can use the_title filter. Just remember to remove it after wp_list_pages() otherwise it will effect everywhere on the site like in menu, main title, search results etc. Example:- add_filter(‘the_title’, ‘my_custom_title’); wp_list_pages(); remove_filter(‘the_title’, ‘my_custom_title’); function my_custom_title($current_title) { if ($current_title == ‘blue’) { $current_title = $current_title . ‘ widget’; } return $current_title; }

How to sanitize post title with commas

Depending on how you are outputting the title, the answer is different. But there are two possibilities. By Using wp_title(); If your theme is using the wp_title(); function in its header.php file, you can use the wp_title filter. However, this function is being deprecated since 4.4. add_filter( ‘wp_title’, ‘filter_the_title’ ); function filter_the_title( $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

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