Changing title & add Breadcrumbs

I’m supposing we are talking about the tab title, if so its possible but not conventional, if is the page title, the code is almost the same and its feasible. In this last case WordPress doesn’t have a breadcrumb per say, we have to make a custom one, nevertheless Woocommerce has one. If Woocommerce is … Read more

HeadSpace2 double title on homepage

In the theme’s header.php look for the <title> tag. You’ll probably find something like: <title><?php bloginfo(‘name’); wp_title(); ?></title> The wp_title() function spits out the blog name now so you can just remove the bloginfo() bit.

How can I automatically insert the page content as the title?

I think save_post action hook is the proper one. Maybe you’ll want to insert some checking if the post title is already set ($post_object->post_title), as this code always update the title according to the content. add_action( ‘save_post’, ‘save_post_wpse_87921’, 10, 2 ); function save_post_wpse_87921( $post_id, $post_object ) { // Auto save? if ( defined( ‘DOING_AUTOSAVE’ ) … Read more

How to add H4 tag to the_content filter (after content)?

Try this instead : //Related stock photo function function custom_content_after_post($content){ if (get_post_type( get_the_ID() ) == ‘portfolio’) { //Query for the the related posts – portfolio custom post type $loop = new WP_Query( array(‘post_type’ => ‘portfolio’, ‘posts_per_page’ => 5, ‘orderby’ => ‘rand’)); $sptitle=”<h4>Related Stock Photos</h4>”; while ( $loop->have_posts() ) { $loop->the_post(); $div = ‘<div style=”margin:25px 10px … Read more

How to insert icon in site title

That setting is html escaped, it means that all the html special chars are converted in the realated html entities, so e.g. < became &lt;. To print correctly you can use echo html_entity_decode( get_option(‘blogname’) ); However be aware, that blogname option is used by WordPress and by a lot WP themes and plugins (e.g. SEO … Read more

How to Customize “WordPress > Error” Text in Titlebar?

Changing interface string is often done using gettext translation filter, but I was in the mood for something different so creatively mangled die handler to achieve it: add_filter( ‘wp_die_handler’, function () { if ( false !== strpos( $_SERVER[‘SCRIPT_NAME’], ‘wp-comments-post.php’ ) ) { return function ( $message, $title, $args ) { _default_wp_die_handler( $message, ‘Our Custom Title’, … Read more

Remove Title of youtube video

Update: Try this one.. it works for youtube url in your post which is converted to iframe by wordpress. function remove_youtube_controls($code){ if(strpos($code, ‘youtu.be’) !== false || strpos($code, ‘youtube.com’) !== false){ $return = preg_replace(“@src=([‘\”])?([^’\”>]*)@”, “src=$1$2&showinfo=0&rel=0”, $code); return $return; } return $code; } add_filter(’embed_handler_html’, ‘remove_youtube_controls’); add_filter(’embed_oembed_html’, ‘remove_youtube_controls’);

Automatically add words if duplicate post titles

Please give this a shot. I didn’t test it, so let me know if it has any errors. Basically, it will check the title before saving and run a loop checking to see if it can get a post by that title. If it can, it will add a new suffix and keep trying. As … Read more

How to edit title on Edit post pages?

Add this code instead on your functions.php, this will change the post and product title to the post or product that is being edit: add_filter(‘admin_title’, ‘my_admin_title’, 10, 2); function my_admin_title($admin_title, $title) { global $post, $action; if ( isset($post->post_title) and $action == ‘edit’ ){ return ‘Edit < ‘.$post->post_title.’ – ‘.get_bloginfo(‘name’); } else { return $title .’ … Read more

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