Questions tagged [title]

Title is the main label on a piece of information. In WP the term is mainly used to label a whole html page, a post, a widget or an attachment.

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

twentytwenty children theme, using gutenberg, changing a title change them all

I started to look forward modifying thèmes and i made a children theme from twentytwenty. On the landing page, using gutenberg, i edited page name at top, then added some paragraph, gallery and when ...
akalabete's user avatar
0 votes
1 answer
23 views

Hide page title on dedicated posts page

My entrypage on my website is a static page. The post page is another one called "Beiträge". How can I remove the page title "Beiträge" on the posts page?
Dirk's user avatar
  • 21
0 votes
1 answer
36 views

If/else statement for specific WordPress page title

I'm very new to the world of php coding and have been learning basic php including 'if'/ 'else' rules but I've hit a brick wall and no amount of Googling has helped. I am currently working on a ...
Yasmin's user avatar
  • 1
0 votes
0 answers
37 views

Change HTML Document Title On Localhost but not Server

I am trying to change the title of a page based on the URL query params. It works on localhost but not server. I used the following hooks and all not working on server wp_title ‎document_title_parts‎ ...
Amir Latif's user avatar
0 votes
2 answers
163 views

Wrong site title and description in google search

as i said in the topic, i can't change the title and the description of the google search of my website (new website btw). I tried to change the title by Theme description, by wordpress settings and ...
Giorgio's user avatar
0 votes
0 answers
16 views

How to link Post Title to uploaded file?

I’ve added a file upload field (post_pdf) using ACF Pro for Posts. Show this field group if Post Type is equal to Post Some posts will be for content entered into the editor… many posts however will ...
William Hamm's user avatar
0 votes
1 answer
160 views

Wrap post titles containing slashes on narrow viewports

I have a post title consisting of two words with a slash between. It seems that the web considers this to be one word rather than two, and it doesn’t wrap when viewed on a phone. I would like for this ...
Brett Donald's user avatar
0 votes
0 answers
15 views

How to hide my categories pages' names, and how as well to reduce the space beween my sidebar's widgets?

I'm currently building my own website using Wordpress as well as the Astra theme (free version). I've been encountering two main issues to which I still haven't found any solution yet : first of all, ...
Spockito's user avatar
0 votes
1 answer
108 views

How to fix special characters when the title or excerpt is shortened [closed]

I have this code for the title <?php $thetitle = $post->post_title; $getlength = strlen($thetitle); $thelength = 26; echo substr($thetitle, 0, $thelength); if ($getlength > $thelength) echo &...
unopermanente's user avatar
0 votes
0 answers
63 views

Hide title block on edit screen in Gutenberg

I find the default title in the FSE to be visually distracting when the custom title block for the front end is placed in an alternate spot. Is there some way to hide the default title? Is there a way ...
sethg's user avatar
  • 31
0 votes
1 answer
84 views

How to change Post title background size?

I'm using a theme called "Blockst" from DeoThemes. On each Post title, I have an incredibly large title background. Unfortunately, I have no idea why or how it became so large. Unfortunately,...
Eric F's user avatar
  • 3
0 votes
1 answer
52 views

Custom Post-Rename Function Does Not Function in WordPress 6.x

I have the following function in functions.php in a child theme: <?php add_filter( 'wp_insert_post_data' , 'modify_post_title' , '99', 1 ); // Grabs the inserted post data so you can modify it. ...
Zyniker's user avatar
  • 105
0 votes
1 answer
51 views

Custom post type split title, setup permalink accordingly

I am currently working on a project, where I need to do this - Create a custom post type called authors Create first name and last name field for authors Single author permalink structure must be ...
Arafat Jamil's user avatar
0 votes
1 answer
127 views

Add string to page title if post in specific category

Can someone please help me add a string to WP page title depending on category of a post ? I did this with post title (code below) however I want to extend it to page title. function recipe_titles ($...
TBV Translation's user avatar
0 votes
0 answers
51 views

Cannot retrieve categories for post in The Loop

add_filter('the_title', 'filter_title_add_post_category'); function filter_title_add_post_category($title) { global $post; $debug = ''; if ( is_single() &&...
Antony Gibbs's user avatar
0 votes
1 answer
15 views

Address as a content type post

I want to create CPT that have a location address as the title. So the person comes on a page, enter an address, it load suggestions and when he click save it autogenerate the title of the post as the ...
Camille B.'s user avatar
0 votes
1 answer
39 views

How to put post title or keyphrase in content on different places automatically?

I want to repeat my title/keyword in different places in my content. for example, my title is "Dog" I want to replace "Dog" everywhere I have inserted *** or any hint. how this is ...
Muhammad Imran's user avatar
0 votes
1 answer
429 views

Auto Generate Post Title from 2 Custom Fields

I would like to generate the post title from 2 custom fields, 'job', which is a taxonomy, plus 'date' which is a date picker, not the date of the post. This is for a custom post type called 'job-...
Michael's user avatar
0 votes
1 answer
40 views

Delete a repeated part of post title in WordPress

All of my posts have the words (With Table) at the end of post title. I want to delete this part in every post title but can't do it manually because there are 10,000+ posts I tried Better Search ...
Sandeep's user avatar
  • 177
0 votes
1 answer
448 views

Getting the Image Title (not the post title)

I've tried over a dozen variations of getting the title now, with mixed results. I get an error, blank output, or the post title, but not the image title. For reference, here's the complete image code ...
WPdummy's user avatar
0 votes
0 answers
19 views

Set document title through shortcode plugin

I have a plugin a web hosting company made for us, and I need the "current challenge" page to show the challenges name as the document page title. Currently it just displays the page name &...
WASasquatch's user avatar
0 votes
0 answers
33 views

struggling to order by title

i have the following page https://gundog.world/my-favorites/ (to view,user=stack pass=exchange) the page functions correctly but i am trying to put the generated list into ascending order by post ...
martin's user avatar
  • 1
0 votes
1 answer
81 views

Can't split the_title() by white space

I am having issues splitting the_title() by white space in my template. $title_split = explode(" ", trim(the_title())); and (from here: https://stackoverflow.com/questions/23206953/split-...
WASasquatch's user avatar
1 vote
1 answer
22 views

An extra ' is displayed in the title

I've found a string that's showing the posts title - blogname as title in the browser, but it's adding an extra ' This is the code I'm using: <title><?php wp_title(‘ | ‘, ‘echo’, ‘right’); ?&...
Adam Larsson's user avatar
0 votes
0 answers
56 views

Change post title but not in widgets/menu/etc

I have searched and searched, and can't find what I'm doing wrong. I am using a shortcode and custom field to edit the title of a post by adding an audio player right behind the title. At first I was ...
Olandir's user avatar
  • 101
0 votes
2 answers
321 views

Adding Text after Post Title based on Category using IF Condition - But not for menu items

Some posts have a more "readable value" even though they are free to read. To highlight their increased reader value, I've managed to get together this piece of code. "Problem" is, ...
Marcus Wood's user avatar
0 votes
1 answer
154 views

Shortcode to appear and show the date not code in Title and description of Social Media sites

I have used some shortcodes for my few posts. You can see here on of the post I have included the shortcode. But when I am sharing this code to any social media it is not able to show the date. Right ...
wasim akram's user avatar
1 vote
1 answer
388 views

Using several custom fields as custom post title

I have stumbled upon a brilliant piece of code that just fits my needs on this thread : Using custom field as custom post title by @chrisguitarguy and I was hoping there might be a way to tweak it to ...
TonioLip's user avatar
0 votes
1 answer
164 views

how to change the title of tag page?

what is the correct function or hook to change the title of tag page ? I want to insert something at the beginning the tag title page.
Mohammad Mahdi Aghakhani's user avatar
0 votes
0 answers
468 views

how to replace h1 entry title with h2 in category pages only

This is the function im using: function change_title_h1_h2( $title, $id = null ) { return '<h2>'.$title.'</h2>'; } add_filter( 'the_title', 'change_title_h1_h2', 10, 2 ); Is there ...
will's user avatar
  • 9
0 votes
2 answers
771 views

Change Page Title

I have successfully changed the name of a specific page using this code in my functions.php file: add_filter('pre_get_document_title', 'change_my_property_title'); function change_my_property_title($...
Joey Lawrence's user avatar
0 votes
1 answer
271 views

how to add dynamic text before and after of post title

In twenty twenty one theme how to add dynamic text before and after of post title. I want to add “Premium” word before title and “today” word after the title. Please help me
Shashi Ranjan's user avatar
0 votes
1 answer
110 views

Use of comment_reply_link_args filter

i am trying to create a filter like this add_filter('comment_reply_link_args','change_author_title'); function change_author_title( $args ) { $defaults = array( 'add_below' => '...
Honoluluman's user avatar
1 vote
2 answers
484 views

How to change page title (from a plugin) in twentytwentyone theme

First, is it even possible to change the page title from a plugin (specifically, from a shortcode defined in a plugin)? This answer says no, but there are certainly reasonable use cases for it. Like, ...
GHolmes's user avatar
  • 63
0 votes
2 answers
57 views

Posts title instead of Pages and Category titles - PHP Wordpress

In order to have two blogs on one website, I was able to put in the menu two categories: DOCUMENTATION and ACTUALITES. My problem is in the header. The titles are displayed well however for both ...
user205282's user avatar
0 votes
1 answer
65 views

I want to add number after post tittle for each category

There is one plugin called auto numbering posts whose function is to add a number next to the post title, but the drawback of this plugin is that it doesn't sort by category. I want the posts in each ...
Guruh's user avatar
  • 3
0 votes
2 answers
363 views

Shortcode To Display Post Custom Field Value in Post Title, Post Content

I want to create a shortcode that pulls value from a custom field of a post and parses that value on Post title, post content. So if the custom field value is Icecream for Post 1. On the admin side ...
Discover's user avatar
0 votes
1 answer
36 views

Move the post title to another field

i added a new field (property_second) to the admin area of the theme. and i want this field value to be the same as the post title. so if the post title changes, let it change here. how can I do it? ...
devo-zara's user avatar
0 votes
0 answers
89 views

add_filter( 'the_title' gets through this if statement twice

I am using the accepted answer shown here: Apply the_title() filter in post & page title, but not in menu title For some reason, the code is getting through this if statement twice: if ( ! ...
l_r's user avatar
  • 21
1 vote
0 answers
262 views

Set a maxlength for the title input in a custom post type

I'm creating a new custom post type. But I need to limit the max length for the title. This is how I'm creating the field in my code: array( 'key' => 'title', 'label' => 'Title', '...
Santiago Mendoza Ramirez's user avatar
1 vote
1 answer
929 views

Disable title block on edit screen for a custom post type

I have a custom post type with a custom block to collect required data and store it in post meta data or standard fields like title or slug, so I don't want to display the Title block. I can't disable ...
Jeremy Skelton's user avatar
0 votes
1 answer
2k views

How to solve the site <title> tag being displayed twice?

My website theme header.php uses this code: <title><?php wp_title('&lsaquo;', true, 'right'); ?></title> And I'm seeing two <title> tags in the page source. How can I ...
anusha's user avatar
  • 11
0 votes
1 answer
53 views

Filter Post Title without affecting screen-reader-text

Let's consider this code: add_filter('the_title', static function ($title) { return $title. '-boom'; }); Works fine, and adds '-boom' near all the titles. But, I also noticed that in some themes (...
Dudo1985's user avatar
  • 113
0 votes
0 answers
53 views

Link to products with the same image title (woocommerce)

I have products with a generic image. The image title is for example abc.png. I would like to generate a link to all products with that image title. Any help would be appreciated. Thank you.
Renier's user avatar
  • 1
0 votes
1 answer
352 views

Add text to the first "title"=>get_the_title($post->ID), and shorten

I use this code to display the title : $imageAttr = array( "class"=>"alignnone size-medium", "alt"=>get_the_title($post->ID), ...
sa eu's user avatar
  • 3
0 votes
1 answer
20 views

Prefix the title tag, if IP address is the dev server

I want to conditionally prefix the contents of the tag if the IP address matches the dev server. I cobbled something together, and it will output the title tag correctly, but the original title tag ...
whakawaehere's user avatar
1 vote
1 answer
286 views

Changing title & add Breadcrumbs

Im wondering the possibilities of making the title of a page change depending how the user got there? For example, if they are on the homepage and make a search, would it be possible to display what ...
Chris's user avatar
  • 11
1 vote
1 answer
178 views

How to edit title on Edit post pages?

The <title> tag in pages for post edit is Edit Post < Site name — WordPress. I want to change it to Edit Post < Site name – The title of the post in editing. Is this possible? Where can I ...
Ooker's user avatar
  • 330
1 vote
1 answer
2k views

How do I shorten the title lenghs with Elementor theme? [closed]

Hi guys I've searched this for too long and I am getting tired now. I need to set a limit on my post titles but I don't know how to do it. On google there are snippets of 300000000 codes to do the ...
Lorenzo's user avatar
  • 11
0 votes
0 answers
14 views

How to check title is being entered in Title Case?

I would like to ensure that my titles are entered in Title Case. I would prefer to do this from the editor, before it is saved to the database, rather than altering what is displayed, or modifying ...
LC1983's user avatar
  • 121

1
2 3 4 5
14