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

How to change the page title from functions.php

If you refer to the post title you need to hook your function to the_title filter like explained in the codex. add_filter(‘the_title’, ‘my_custom_title’, 10, 2); If you refer to the HTML meta in your page then you need to hook your function to document_title_parts filter explained here. add_filter(‘document_title_parts’, ‘my_custom_title’, 10, 2); The two filters work … Read more

Replace category titles

Well thank you for this question i did this after you posted this function category_title( $title ){ if( is_category(‘name1’) ){ $title=”name1 title”; }elseif( is_category(‘name2’) ){ $title=”name2 title”; } return $title; } add_filter( ‘get_the_archive_title’, ‘category_title’ ); Hope this helps

why adds ‘»’ symbol?

The wp_title function is meant to be used in things like breadcrumbs where you would want something like My Blog » My Category » My Post. As such the function allows you to prepend something to your title. By default it prepends ». If you just want the title of your post or page use … Read more

How to list all titles of posts on a specific page?

Paste this into your page template. It will output a list of all posts (without pagination). <?php // the query $all_posts = new WP_Query( array( ‘post_type’ => ‘post’, ‘post_status’ => ‘publish’, ‘posts_per_page’ => -1 ) ); if ( $all_posts->have_posts() ) : ?> <ul> <?php while ( $all_posts->have_posts() ) : $all_posts->the_post(); ?> <li><a href=”https://wordpress.stackexchange.com/questions/240419/<?php the_permalink(); ?>”><?php … Read more

Change the output of wp_title()

Take a look in header.php of your theme. Some themes have the title output like this: <title><?php wp_title(‘|’, true, ‘right’); ?> | <?php echo get_bloginfo(‘name’) ?></title> So you’ll have to remove the | <?php echo get_bloginfo(‘name’) ?> part. However you should keep the title of the site in the <title> for SEO purposes.

How can i remove JUST the title tag from wp_head() function?

You can see everything added to wp_head in the file /wp-includes/default-filters.php. If your theme supports the title tag, you can remove it entirely with remove_action: remove_action( ‘wp_head’, ‘_wp_render_title_tag’, 1 ); Though it may be simpler/better to use remove_theme_support( ‘title-tag’ ) in a child theme, which is what _wp_render_title_tag checks before outputting the title tag.

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