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
1
vote
1answer
25 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 ...
0
votes
1answer
22 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.
0
votes
0answers
32 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 ...
0
votes
2answers
25 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($...
0
votes
1answer
24 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
0
votes
0answers
6 views

Update a title before saving a CPT

Currently I've created a custom post type to add 3 fields in the Database. I've hidden the title because I want to have a limitation + custom field to add content. Now I'm trying to use the value of a ...
0
votes
1answer
22 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' => '...
0
votes
0answers
17 views

insert metadata on title

I have this function add_filter('wp_insert_post_data', 'modify_post_title', '10', 2); function modify_post_title($data, $postarr) { $customer_name = $_POST['customer_name']; if ($data['...
0
votes
0answers
14 views

How to add 'Add Media' button to post title box?

I want to add post title from media file(pdf) name. Is there a method to fetch title from file name while typing the post title. I mean is there a method to add a 'Add Media' Button on top of 'Add ...
0
votes
0answers
17 views

How to decrease the size of the title shown on homepage

I am trying to decrease the size of the title shown on my webpage, but couldn't do it, my website is hosted on wordpress and I am using Astra theme, texts shown on my homepage looks bigger (Earn Money ...
0
votes
0answers
16 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, ...
0
votes
2answers
22 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 ...
0
votes
0answers
19 views

Italics in title resulting in weird HTML

I'm creating a website for an author/journalist who will frequently need to italicize words within the Titles of his Posts. I have suggested a rather shabby workaround to this persistent Wordpress ...
0
votes
1answer
31 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 ...
0
votes
0answers
81 views

For Chinese language how to make WordPress post slug and permalink as like as the post title?

For the Chinese language, WordPress permalink and slug are not readable. It converted to ASCII. Is there a way to make permalink and slug as like as the post title?
0
votes
2answers
47 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 ...
0
votes
1answer
26 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? ...
0
votes
0answers
31 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 ( ! ...
1
vote
0answers
19 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', '...
0
votes
0answers
9 views

Alter the page title with a hook, without altering navigation links

I've written a basic function with the goal of altering the page title. It works. However, the new string also replaces every single navigation menu item on the page. At first I thought that might ...
1
vote
1answer
220 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 ...
0
votes
0answers
75 views

Limit Blog Post Title to 2 Rows/Lines

i recently started creating my wordpress blog, and i would like to limit the title of a post to 2 rows to keep everything organized. I already found a function that lets a limit in amount of ...
0
votes
1answer
132 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 ...
0
votes
1answer
36 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 (...
0
votes
0answers
13 views

Why is AIOSEO page title not replacing native WP page title?

Just updated AIOSEO to 4.0.12 and i'm having page title issues. Specifically, each site page title consists of the title I've specified in that page's AIOSEO admin screen, PLUS (incorrectly), the ...
0
votes
0answers
18 views

Copy title field to caption field for media files

I need to fill caption field of hundreds of media files in some art gallery site. Titles are already filled with the necessary information. Is it possible to fill caption fields automatically with ...
0
votes
0answers
23 views

Add post title as a tag

How can I add post title to post tags? Example: Post title: post title Tag: before post title after wp_set_post_tags(4260, array ('befor','.get_the_title().','after'), true ); this function didn't ...
0
votes
0answers
22 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.
0
votes
1answer
75 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), ...
0
votes
1answer
16 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 ...
1
vote
1answer
36 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 ...
0
votes
0answers
13 views

How to change or delete the title of the woocommerce store?

Install woocommerce on my website and the store and products appear with the title "false" How could I delete or change it?
1
vote
1answer
54 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 ...
1
vote
1answer
360 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 ...
0
votes
0answers
11 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 ...
0
votes
1answer
17 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?
0
votes
0answers
24 views

Checking if site title and tagline settings are checked in Customizer

There is currently the option to display a site's title and tagline in Customizer. There doesn't however appear to be a WordPress function to validate if these are checked or otherwise. The purpose is ...
0
votes
1answer
18 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, ...
2
votes
1answer
86 views

Capitalize All Titles and Headlines in Chicago Style

I want to capitalize all titles and headlines on my blog according to the Chicago Manual of Style. Since this is a very tedious and time consuming task to do it manually, I thought there must be ...
0
votes
0answers
50 views

Date Shortcode in Image alt and title tags

I am using the following shortcode for year in my Content. function year_shortcode() { $year = date('Y'); return $year; } add_shortcode('year', 'year_shortcode'); The same shortcode I used in the ...
0
votes
0answers
18 views

Shop Category Pages missing <h1>s

My website is using Future Life theme and Woo Commerce. On the shop product category pages, it doesn't display the category name and there are no <h1>'s ../nothing to make a <h1>. Does ...
0
votes
0answers
51 views

Special characters in post_title replaced by '?'

This is my code : if( !empty( $_POST ) && !empty( $_POST['foo-action'] ) ){ $html .= sprintf( '<table><thead><tr><th>%1$s</th><th>%2$s</th><th&...
0
votes
1answer
19 views

how automatically show the image title before the image caption/description in a wordpress gallery?

I am using a simple Wp 5.x gallery like this [gallery size="full" columns="1" ids="6304,6305,6306,6307,6308,6309"] The gallery shows me the images and the captions/...
1
vote
1answer
821 views

Woocommerce: How to remove page title from storefront theme homepage

I have been searching online for this and everywhere I go it says to put the following into your functions.php function remove_title_from_home() { remove_action( 'storefront_homepage', '...
1
vote
2answers
21 views

I want to show category in the post title , how can I do

How to add Category name to post title ? “PostTitle + CategoryName”?
0
votes
1answer
14 views

How to get the full product name by ignoring custom modification on it

I've added a filter to simplify product name on my shop page. This is the code I use add_filter('the_title', 'mod_product__title', 10, 2); function mod_product__title($title, $id) { global $...
0
votes
1answer
45 views

Modify WordPress Page Title (<head></head>)

I'm trying to modify the WordPress page title. However I'm fairly new to WordPress functions, hooks (filters & actions) and so on. What I could achieve is to change and modify WordPress titles in ...
0
votes
0answers
30 views

display post pdf attachments in side bar with link text

I have a widget that places links to pdf attachments in the sidebar. I want to use the pdf attachment text heading (that is used to display it in the parent post) as the title. I cannot get this to ...
0
votes
0answers
40 views

Time Stamp In A Wordpress Post Title That Does Not Keep Refreshing

I have a short-code that uses PHP to echo a time stamp ala: 1595140137 When I use that short-code as the default post title in new post, the post title changes with each page refresh, and in the ...
0
votes
1answer
29 views

Title tag on home using front-page template not showing

Currently in header I have the following: <title> <?php wp_title(' | ', true, 'right'); ?> <?php bloginfo('name'); ?> </title> I tried adding if statement like the ...

1
2 3 4 5
14