Questions tagged [wp-title]

Display or retrieve page title for all areas of an installation or a site of a multisite or network install.

Filter by
Sorted by
Tagged with
0
votes
1answer
31 views

Trying to add some custom text into Wordpress Post title via function.php

I need to add a custom text in wordpress Post title dynamically which I'm trying to add via this code in function.php Following code is not working add_filter('the_title', 'new_title', 10, 2); ...
0
votes
1answer
32 views

Theme support title tag - how to replace the default WP separator (with a filter)?

I'm developing a theme for Themeforest and one of their requirements is about the tag. Themeforest states their requirement as follows: The theme must let WordPress add and manage the title. This is ...
1
vote
3answers
2k views

How to set custom title of custom page template?

How to set custom title of custom page template? I try use wp_title filter but it's not working.
0
votes
0answers
9 views

the title of the post and feature image is repeating

I m facing a problem in my posts, the title of the page is repeating and the feature image too. I don't know how to solve this issue. please guide.
6
votes
2answers
15k views

How to change the seperator in the title

Change title separator. I'm working with the underscores starter theme. I want to make a small change to the title. Change the separator from "Post title | site name" to "Post title - site name" ...
6
votes
4answers
22k views

Limit the word count in the post title

Is there a way to limit the word count of the post title? I searched over the internet but found nothing. All I know is, only the content of the post can be limited or excerpted.
0
votes
1answer
1k views

Modify title of custom taxonomy archive page

I have a custom post type 'question' and taxonomy 'question_tag'using Anspress plugin. When visiting a tag page the title is "Example Tag". Desired result: "Questions on Example Tag". How could I ...
1
vote
1answer
513 views

change title separator

tell me how permanent the links to change the splitter from vertical to horizontal of the main page write website. | — http://joxi.ru/a2XlxQXcyeKPj2 The name of the site | short name The name of the ...
1
vote
0answers
9 views

Dynamic webpage titles

We have statistical website made on elementor which is showing covid-19 cases updated continuously all day similar to https://www.worldometers.info/coronavirus . This website's page title changes as ...
0
votes
0answers
25 views

Post title not displaying as recorded in the wp_posts table

I have a WordPress install in which the "post_title" field from the "wp_posts" table is not making it into the WP_Post->post_title variable. So, for a given post in the wp_posts table that has a ...
0
votes
1answer
664 views

How to remove page title from wp head on specific page?

I'm trying to remove page title from a template. Actually I'm using custom in title for singledigital.php template, and wp_head also adding page title on this page. So i want to remove it. I have ...
0
votes
1answer
45 views

How to Customize Wp Default Title and a prefix

This code snippet shows (prefix) category Name first before the Post title (Very right). E.g Music: %Post_title% Video: %post_title% Lyrics: %post_title% News: %post_title% Lifstyle: %Post_title%. ...
0
votes
2answers
79 views

How do i tweak my wp Post title base on category of the post

Hello please i need a wordpress function.php code where i can choose how to display my title differently in section wp_title. E.g. If home, tag page, Category page, And Pages are viewed then "...
1
vote
2answers
68 views

Html title best practices and usage (wp_title, title-tag support, etc..)?

I really can't get the right practices from official docs. I think it's a complete mess. At some point, they started to say to activate the title-tag feature: after_setup_theme > add_theme_support('...
0
votes
2answers
3k views

How to modify a title tag in genesis?

I need to modify the outputted <title></title> tag of a few specific templates, and it has to be done in php so I can dynamically generate content for it. I've been playing around with ...
0
votes
1answer
55 views

post_exists returning 0 if title contain special characters

I am using the below code: $title = get_the_title($result->post_id); if ( 0 === post_exists( $title ) ) { $title = 'Document Id: '.$result->post_id .' (Deleted)'; } But it's returning 0 if ...
0
votes
1answer
47 views

How to get string from add_theme_support('title-tag') for meta tag and beautify?

It recommends that we should use add_theme_support('title-tag') for displaying blog title. However, I also need to get the title as string for another purpose. It's for optimizing SEO. As you already ...
0
votes
1answer
20 views

Changing title using filter not working with argument

I'm trying to change my custom page's title and I'm able to do this with this function: add_filter('the_title','change_title'); function change_title($data){ global $post; return 'Page ID ' . ...
0
votes
2answers
1k views

how to customize the page title of a custom php file

I'm creating a custom php/js pages querying and displaying results from a separate non-wordpress DB on a 2nd page. The header and footer will be the same as my theme so I'm calling the theme's footer ...
0
votes
1answer
44 views

Wrap the 2 firsts words of title with a <Span>

I would like to enclose the 2 first word of title inside a to get the following result: TOP 5 of best photos I tried using the code below, but it returns only the first word. How can i do to select ...
0
votes
2answers
15 views

Assistance with wp_title function

I have this command that I'm using. I want it to use the template formating for the title but I can't figure out how to add it. I found this code online to strip everything and I added <?php ...
1
vote
1answer
237 views

wp_title() returns 'page not found' on page 2

I'm currently making a custom Wordpress template, and I'm using paginate_link to make page links at the bottom. index.php <?php get_header(); ?> <div class="container"> <div ...
0
votes
1answer
441 views

my site show this symbol (::) between site title and tagline

i have a web site with a problem in a tag "<title>" , i see between site title and tagline this character (::) in home page and only one (:) in other page, in my header.php theme i have this : ...
0
votes
2answers
1k views

Add PHP code after title in single post pages?

I tried to add PHP code after the post title in single post pages by adding a filter to functions.php, but this did not work: function theme_slug_filter_the_content( $content ) { $custom_content =...
0
votes
1answer
48 views

How to change dynamically page title according to variable data?

I created a shortcode for creating dynamic pages with the help of API data. If someone changes the page title I also want changes. Now I have a dynamic page title in a shortcode function, but I need ...
0
votes
0answers
553 views

how to get wp_query posts only first letter of alphabet A?

I want to get all the data by wp_query only the first letter of title specific alphabet 'A'. My code will be like: $the_query = new WP_Query( array( 'posts_per_page'=>10, ...
0
votes
1answer
80 views

Add specific word before the category page title

in my site category page (archive page), the page title in browser is like this: My site | Site Description | Category title How i can add specific word befor all of category title. like: My site | ...
1
vote
2answers
865 views

How to change the page title from functions.php

I have an ACF custom field that depends on the value I need to change the page title, however, I cannot affect the page title, it appears my code is running after the page title is generated. To ...
0
votes
0answers
31 views

long-title posts do not want published

long title posts do not want published, when I click on published (not function) always on draft. For example: The title 'Le général sorti un badge et se dirigea vers l’une des portes entourées de ...
0
votes
2answers
1k views

The <title> tags can only contain a call to wp_title(). Use the wp_title filter to modify the output

I am submitting my theme to WordPress.org. To make it compatible with WordPress 4.1 and greater, I replaced wptitle() tag with add_theme_support( 'title-tag' ) but now the error has changed to ...
0
votes
1answer
64 views

disallow publish posts with special title

I want to disallow some titles on wordpress and avoid publishing these posts. example : "title : last news 8 hours ago" When this sentence is in the post title, I want disallow publish the post. ...
5
votes
2answers
13k views

Changing title of a page dynamically from within a plugin

Every WordPress page can be described as having two titles: The page/post title, which is displayed within the page/post via the the_title() function call The html <title></title> tag ...
0
votes
0answers
30 views

How to get page title (<title></title>) in a different order?

I am trying to figure out, how to change the current order of the page title (displayed on the tab or browser windows). Currently, it is <page_title> - <site_title>. The site title is ...
3
votes
1answer
57 views

How to insert the number of posts from the category in wp _title?

For example, the site has a category "News", in which there are 37 posts num. How to insert into wp_title the number of records (37) in this category. those, if we go to the "News" category, the ...
0
votes
1answer
54 views

Display last updated in <title>

I am new to WP so the issue is the following: I want to display the Month's name of the last updated date of my post in title tag. How can I do this?
1
vote
4answers
19k views

Displaying Page Title on index.php

I have my posts page set as index.php, and on there I have my main heading (as I do on all pages). I'm having trouble displaying the page's heading however. The page is called 'Blog' in WordPress, ...
0
votes
1answer
84 views

Please I want to prefix my WP posts title according to each category

What i mean is that. My categories are: Music. Video Etc... So i want post title per category to be like this. Post in music = should be "Download Music: wp_title()" Post in video = should be "...
1
vote
1answer
68 views

How to Change The Title in WordPress For SEO

My concern is when I search for that company I see what is shown in the image. Instead of Home, I require it to show a custom title that is good for SEO. What is the best way to fix this? Please ...
-2
votes
1answer
68 views

Adding a custom field after post title (ex.Example Title [30 Second Read])

function wpd_title_prefix_filter( $title, $post_id ) { if( $checked = get_post_meta( $post_id, '_wpd_title_prefix', true ) ){ $title = '[30 Second Read]: ' . $title; } return $...
0
votes
3answers
237 views

How to add custom filed value after in wp post title

(WP Post Title)Malwarebytes Anti-Malware (Custom field value)3.5.1.2522 How to add custome meta value in wordpress after wp post title in same hyperlink
1
vote
0answers
32 views

How to remove main domain header title from after sub domain header title

I have installed WordPress on the main dame in public HTML and have installed all domains in the sub folder. But when we do Google, the title of the main domain comes in the title of all the domains. ...
0
votes
0answers
31 views

Set page title in WordPress with PHP

I know this question has been asked thousands of times before, but I have attempted a lots of these solutions without any success. Attempted solutions, among others (added to the template page) ...
1
vote
1answer
142 views

Events Made Easy Plugin - Duplicate Title Tags

I use the Events Made Easy plugin to handle events for a client. Recently while scanning my site for issues, I noticed that I'm getting blasted with duplicate title tags in the "events" pages as they ...
0
votes
0answers
144 views

Reorder title tag and description tag with wpseo_title and wpseo_metadesc

I'm trying to change the order of the title tag and description tag (CMS Wordpress, plugin Yoast SEO). Now in the code of the page it looks like this: <title>something ...</title> <...
0
votes
1answer
173 views

HTML regex convert to titlecase

I have a plugin with an option to use regular expression and find and replace the title post. I need to convert lots of titles with uppercase and lowcase letters to title case, but I have no idea ...
2
votes
0answers
586 views

Search query - exact post title match

I have a bunch of posts titled something like this... English Language 2015 English Language 2016 English Language 2017 English Language 2018 And on each one of these posts I have a dropdown select ...
0
votes
1answer
24 views

tweaking the <title>

so I wanted to change the <title> head element and found this post: Change the_title() of a page dynamically I followed and my function now looks like this: # set title per page function ...
0
votes
1answer
26 views

How to place POST TITLE any location inside the posts page

I am editing the single.php file, and I want post title to appear inside a particular div. Since my theme doesnt show the post title, I want to retrieve the post title on posted article page. " > &...
0
votes
1answer
65 views

How do I fix title? [closed]

my title appears as home-title, I'm trying to remove but it's not working code in header.php is <head> <title><?php wp_title('|', true, 'right'); ?></title> <meta ...
1
vote
2answers
261 views

Replace category titles

I want to display different titles in category archives than the category title. I have created a function with if statements for this purpose: function category_titles_change() { if (...