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.

164 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
1answer
101 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 ...
2
votes
2answers
2k views

Add Category name to Post Title (h1)

How to add Category name to post title (H1)? “PostTitle + CategoryName”? My h1 post title code: <?php the_title( '<h1 class="entry-title">', '</h1>' ); ?>
2
votes
0answers
41 views

How to add a custom field after wp post

I want a subtitle box after the title. How to show it in the post editor?
2
votes
0answers
35 views

How to filter out post type meta?

I have used this code to filter out the post type and it works fine when showing filtered results: add_filter('wpseo_title', 'vehicle_listing_title'); function vehicle_listing_title( $title ) { ...
2
votes
1answer
707 views

How to display dynamic content in start_lvl function

I am creating a custom nav walker but having trouble outputting parent menu item title in start_lvl function. I want to output it right after the <div class="dropdown"> in the following ...
2
votes
2answers
299 views

Add Link Text Back to Insert/edit link Box

Version 4.2.1 of WordPress removed the link text from the Insert/edit link box. How can i add it back?
2
votes
0answers
77 views

Sorting posts alphabetical that have single digits

I have post titles that are like this: Episode 1 Episode 2 Episode 6 Episode 10 Episode 14 I try to list posts alphabetically but it ends up showing like this: Episode 1 Episode 10 Episode 14 ...
1
vote
0answers
28 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', '...
1
vote
1answer
39 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 ...
1
vote
0answers
28 views

Page title is showing category name as well in the google search results

I am using WordPress 5.4.1 with yoast seo plugin on my blog (buybestproducts.in). In the meta box, title is separated by a hypen followed by site title. Everything looks fine. However, when google ...
1
vote
0answers
29 views

Removing Title From Links to Site

So I've been using my wordpress site to blog. I've also been importing those blogs to Medium, and anytime I share the article the site title is appended to the end. So if the article is named "100 ...
1
vote
0answers
16 views

Get Image from Media Library with the Title

i have set the Title from a Image in my MediaLibrary to "slider". I want to add this Picture via. Code to my page.php file. I dont want to use the ID, I want to use the Title. How can i do this? ...
1
vote
1answer
71 views

Replace URL with Site Title in Search Results

When searching my company on a mobile device "Tattini Boots". You can see that the URL is displayed vs. the site title at the top (view image below). I am using Wordpress and was wondering where ...
1
vote
0answers
29 views

Applying A Category to Existing Posts Where Page Title Matches Regex

I have a whole bunch of posts that I need to add a category to (too many to do via Bulk Actions). They all follow a predictable/consistent post title naming structure that could be matched via regex. ...
1
vote
0answers
58 views

Get all posts with a duplicate name

I am running an import script which adds a large number of product post types. Some of these are identical apart from perhaps a size or colour value in the CSV. My script creates the new post types (...
1
vote
1answer
86 views

Remove the first 5 characters of the_title and orderby that

I have a custom post type where all titles are dates (in this format: YYYY-MM-DD). I need to order them by month then day, but not at all by year. So I imagine I need a filter to 'look' 5 characters ...
1
vote
0answers
32 views

Title attributes on Permalinks for posts and products

I need to add title attributes to my wordpress links for new posts, pages and products on a website. This is for the actual post/page/product and not within content. For example if I create a post/...
1
vote
1answer
248 views

Is possible add icon in title posts only in specific tag?

I want to add an icon in title posts only in posts with specific tag. Is this possible? I've already tried these codes, but they didn't solve my problem: Approach #1 if (is_tag('162')) { ...
1
vote
0answers
123 views

WP Query Args - Title or Taxonomy Value

How do I query by tax_value or title? I have $args = array( '_meta_or_title' => sanitize_text_field(preg_replace('/%20/', '+', $query[1])), 'posts_per_page' => 100, 'post_type' =&...
1
vote
1answer
118 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 ...
1
vote
1answer
598 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
1answer
1k views

Change the Title Tag of Search Products Page

Yes, i've seen some answers on different questions but they didn't fit to my situation. My theme has title tag enabled. The title in the wp_get_document_title() function is different than the real ...
1
vote
1answer
99 views

Widgets not adding div on before and after title

I'm trying to get a wrapper around my h3 widget title, because i want to give the h3 a vertical align bottom. Currently i'm registering my widget as following: function usp_widgets_init(){ if (...
1
vote
1answer
1k views

Get rid of title from static front page

I don't have an image logo header yet, rather, I'm just using one of my 'Pages' as my static front page. It's title is "Welcome" So now, 'Welcome" and links to it are appearing in three places: at ...
1
vote
1answer
140 views

Custom title set on quick edit

I have set up a custom post type without title support and have added a code for the title to be automatically populated from custom fields. This works great when creating or updating a post on the ...
1
vote
1answer
374 views

Set Title from Custom Template

I'm building a site that uses a custom template to display a set of listings that are pulled from an external API. I need to set the title and meta description values using data from the API. I've ...
1
vote
0answers
119 views

Change page title dynamically before header is rendered

Hi I am trying to change the page title prior to wp_head being rendered: $pdf_link = plugin_dir_url(__FILE__) . 'pdf/generate_pdf.php?type=single&event_id=' . $id . '&uid=' . $_GET['...
1
vote
1answer
150 views

Modify conditional titles to include parent and page number

Using conditional titles with title-tag rather than wp_title(), how do I add the immediate parent or ultimate grandparent to the title and,for multi-paged posts, the page number? When using wp_title()...
1
vote
1answer
234 views

plugin admin subpage title and links in menu not highlited at current page

In my custom plugin subapges i want to echo their titles specifed in add_submenu_page() but i don't know how do that. This is part of code of my plugin which display links in left-side menu: ...
1
vote
1answer
335 views

Enqueue and Dequeue from admin bar nodes

I developed a few nodes under my custom parent node on admin bar. While navigating on frontend and clicking on one node I'd like to enqueue some css file. The url should remain. While navigating on ...
1
vote
1answer
125 views

Custom Postype specific changes in admin panel

I have this small bit of code which does exactly what I need. But I want to limit its use to one Custom Post Type (CPT) only. add_filter('sanitize_title', 'my_custome_slug'); function my_custome_slug(...
1
vote
1answer
690 views

Which filter affects the 'entry-title' post class

I created a plugin setting a $var to true if the post belongs to category 'a', and set the same $var to false if the post belongs to category 'b', it works and I can get the correct value depends on ...
1
vote
0answers
1k views

Editing does not change post_name

Suppose I wrote an article, "My Article Title", it has been saved into the database with $post_name=my-article-title , and the permalink is mysite.com/my-article-title. All good. Now, if I didn't ...
1
vote
1answer
978 views

Blog Title not showing up on main Blog page

I cannot get the main blog page with the current blog to show the current blog title. It shows on all other pages, just not the current/most recent blog. Any help will be greatly appreciated. Thank ...
1
vote
0answers
288 views

sql select for post_title and a term name

I'm having trouble trying to think out this SQL select I need to write; here's the gist: I'm programmatically creating posts by importing an excel file, so I'm in 100% sure of post titles, etc, since ...
1
vote
1answer
153 views

how to add text to posts from tags

How can I add custom generated text to posts using text from tags? Something like: [Post Title] + custom text + tags + custom text .... Or is there a plugin which does this ?
1
vote
1answer
389 views

How to set the seo title tag on a page by page basis?

I am storing the SEO title with advanced-custom-fields. How do i set the seo title tag within my single-mypost.php template. This is the place where i can call get_field('title_tag'); I tried ...
1
vote
2answers
472 views

Save title as custom field on custom post type

I need to have a hidden custom field that will be automatically populated with the title of the post on save. My goal is to query posts by all its meta fields, including the title, but from my ...
0
votes
1answer
13 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 ...
0
votes
0answers
19 views

How to merge the content of posts that have the same title?

Good evening everyone... I apologize in advance for my bad English, for any complaints go to google translate :). I need to merge posts with the same title and I don't know how to do it. The situation ...
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
36 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
1answer
30 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
9 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
0answers
18 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
20 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
0answers
88 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
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? ...