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.

155 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
2answers
1k 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
34 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
32 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
520 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
184 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
75 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
7 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
26 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
10 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
35 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
27 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
51 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
64 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
27 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
107 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
101 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
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 ...
1
vote
1answer
519 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
702 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
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.
1
vote
1answer
95 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
100 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
317 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
110 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
109 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
919 views

How to remove category titles?

When I go into certain categories, there is a page title that says "Category: category_name", like this: I would like to remove the "Category" from that title. I've already looked around quite a bit ...
1
vote
1answer
207 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
257 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
119 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
517 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
955 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
961 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
285 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
72 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
217 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
291 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
0answers
9 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
32 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
23 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 ...
0
votes
0answers
11 views

I need to make the title of the page dynamic in my custom plugin

// Our callback to create the contact form page. function gym_contact_create_form() { $form = array( 'post_title' => wp_strip_all_tags( 'Gym Contact Page' ), 'post_name' => 'gym-...
0
votes
1answer
27 views

how to set alt & title for featured image get_the_post_thumbnail

I want to set post title for alt and title Attribute in this code what should I do? <?php if ( true == get_theme_mod( 'archive_featured_images', true ) ) : if ( has_post_thumbnail() &&...
0
votes
0answers
10 views

How to completely get rid of page titles with no use of plugins?

Hello StackExchange community, I desperately need your help. I am trying to completely get rid of the page title and the space that occupies right before the beginning of the content. Here is what I ...
0
votes
1answer
46 views

how to display posts content on the custom css popup by clicking on each title on the sidebar?

I want to display post titles based on post_tag from default post_type concat with post_category from another post_type named 'update' on the sidebar. And finally When users click on each title it ...
0
votes
1answer
27 views

Display text if title in archive has specific word

In tag pages, I want to display specific text if the title containing a specific word. As example: I have a Tag and tag archive page: Yellow Banana And I want to display “cool fruits” in all tag ...
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
0answers
13 views

How to add an image dynamically to post title if it is published today or less than 2 days

I was trying to add an image like a "new" image to the posts which are just published and are less than 2 days old. I tried using a function like this within a WP_Query but it is applying to all ...
0
votes
0answers
10 views

WordPress My Account Title and text color change

I am looking to change the colors of the “My Account” page text and title. I found how to change the links and user name but the other text and title do not change. Does anyone know how to change ...
0
votes
1answer
24 views

How to change default home link title?

This is My home page but the title in the header shows the first post name. How can i change the custom link homepage title ? I want here to show home and in the post header it should show post title?...
0
votes
0answers
14 views

How can I insert an image in the site title (theme: 20 17)?

I have a WordPress site using the theme Twenty Seventeen. I want to insert a tiny image (not a logo) on the right edge of the title. The image isn't much taller than the letters. I couldn't find any ...