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
0 answers
10 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
37 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
11 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
41 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
38 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
51 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
40 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
49 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
0 answers
11 views

Changing The Default Header POST Title and Description text by category in wordpress

everyone. I use the Business3ree Ignition theme by CSS Igniter. I have set up two categories "Tips" and "News" to filter my content in those two categories. I need to be able to ...
Jose Javier's user avatar
0 votes
1 answer
88 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
28 views

Change modified date to current date when title updated automatically

I use shortcode in title for everyday date (1 Aug 2022), so daily the title has been modified because of date change but modified date is not updated every time when title modified. How to update ...
Puneet's user avatar
  • 37
0 votes
0 answers
48 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
14 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
168 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
37 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
0 answers
23 views

Change displayed "page name" to distinguish multiple pages with the same title

I have multiple thank-you pages, depending of if they completed an action in full or just partially. But the title "¡Hey, felicidades! ❤️😀" is set the same to both pages (the only change is ...
Xavi Montero's user avatar
0 votes
1 answer
224 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
30 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
66 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
21 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
53 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
170 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
128 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
278 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
103 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
338 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
567 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
222 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
81 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
345 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
30 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
55 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
263 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
30 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
66 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
213 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
830 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
46 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
30 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
309 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
223 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
150 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
  • 318
1 vote
1 answer
1k 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
13 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
0 votes
1 answer
105 views

how can I change the font on Edit Post area (admin dashboard)

I need to change the font family on the Edit Post title and post area title. how can I change it?
VJ Ranga's user avatar
  • 103
0 votes
1 answer
139 views

Changing Title Tag on Shop Archive Page (current solution reverting to Title of First Product in Loop)

Firstly, add_theme_support( 'title-tag' ); is enabled in my theme. I have two filters to modify titles, this one hooking on to the_title add_filter( 'the_title', 'custom_account_endpoint_titles', 10, ...
bbruman's user avatar
  • 444

1
2 3 4 5
14