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
3answers
234 views

Front page displays different <title> than all other pages?

<head> <title> <?php wp_title(''); ?> </title> </head> This displays the page title in the title correctly everywhere except on the front page where it displays "...
0
votes
1answer
677 views

“Page Array” displaying in title bar on Front Page

The issue is that the text "Page Array" is displaying in the title bar instead of what was previously there, which was just a "|" separator. I'm trying to puzzle out why this issue appeared...it came ...
1
vote
1answer
499 views

Uppercase to sentence case for post titles

I have more than 7500 products in woocommerce with TITLES IN UPPERCASE. I'd like to change these to "Sentence case" What would be the best way to apply the script to all titles in the WordPress ...
1
vote
1answer
130 views

How to Orderby Comments by post title?

Whatever I tried so far didn't work. So I started looking everywhere for a few days now, trying to figure out how to order comments by the title of the post they are made into. (I tried a meta_value ...
0
votes
1answer
1k views

Display page number on custom page title function

When paginating a blog archive, pages 2+ of a post archive are currently just displaying the single_post_title and not also the page number in the <title> tag. Is there a straightforward way to ...
0
votes
1answer
476 views

Site shows URL instead of “meta title” after deleted few plugins (not any SEO plugin was deleted)

www.Pifeed.net after i deleted some useless plugins due to load-time issues the blog pages show url instead of title tag, though meta title tag is there in source code.. thanks for answers
2
votes
2answers
1k views

String replace Wordpress Site Title

I want to get rid of a dash '-' in my Wordpress site title on mobile. To do that, I want to place a span around the dash, something like the below. Desired Result <h1 class="site-title">My ...
0
votes
1answer
46 views

Modify link options when hovering over post title

In dashboard, clicking on "Posts" reveals rows of posts. When I hover over one of them, specifically over their title, I get hyperlink options such as "Edit" and "Trash". I have a plugin that adds ...
1
vote
1answer
107 views

Is it possible to use multiple spaces in title?

I would like to use three spaces as divider in my titles. I remove all filters with: remove_all_filters('the_title'); and add my own filter: add_filter('the_title', 'my_title_filter'); for example ...
0
votes
2answers
749 views

Sanitize title only if only custom post type

I want to sanitize the title of a specific custom post type. I've managed to create a filter which sanitizes the titles. How ever It affects rest of the post types as well. After a lot of search I've ...
0
votes
1answer
97 views

Blog Post Title apearing twice

I can seem to find what is wrong. Here is the problem http://www.cookouvagia.com/blog/ Title of the latest recipe appears twice. Any advice would be great! Thank you in advance!
0
votes
1answer
114 views

Possible to create a new post and have the Title and Slug automatically use the post's ID?

For a given Custom Post Type, I'd like that every time I create a new post (by using the Dashboard, clicking the button "Add new"), that the slug and Title assume this post's ID. I belive that the ID ...
0
votes
2answers
1k views

How to disable Publish button on Edit post if post title exists

I want to ask a question: I have a source code, it only works for the post-new, but not edit post. So how to disable Publish button on Edit post if post title exists? add_action('wp_ajax_check-posts-...
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 ...
0
votes
1answer
283 views

How to disable publish button if post title exists

Happy New Year 2017 I'm a newbie of both PHP and WordPress, so I have a question want to ask. Like the title, how can I disable Publish button if post title exists. Many thanks to everybody P/S: ...
6
votes
2answers
14k views

Changing title of a page dynamically from within a plugin

Every WordPress page can be described as having two titles: The page/post title, which is displayed within the page/post via the the_title() function call The html <title></title> tag ...
0
votes
1answer
42 views

How do I separate the post title from the content in an excerpt coded thus:

We're using a theme for a client that has programmed in their own excerpt & it's alright but it doesn't separate the title from the text in the excerpt itself, which is shown on the blog page. ...
1
vote
2answers
2k views

Wp query orderby 'title' doesn't work

I would like to order a list of post title alphabetically. I am using this specific query // WP_Query arguments $args = array( 'category_name' => 'reportage', 'order' =&...
0
votes
1answer
355 views

How to disable site title and description when custom header is uploaded on the customizer?

I'm builting my own wordpress theme and I'm trying to create a function with an if else statement to diseble the title and description of the blog when i have a custom header. if I have a custom ...
-1
votes
2answers
194 views

How can I change tagline in title tag “Just another wordpress site”?

I need change the tagline to a custom, specific tagline, further describing my business such as - "self-funded revenue increase" but I can't find it.
0
votes
1answer
2k views

Sanitize the output of the_title() or the_title_attribute() to remove whitespace

I have an issue. I have a piece of sharing code which I created for social media. <a href="http://twitter.com/home?status=<?php the_title(); ?>.<?php the_permalink();?>" class="...
0
votes
1answer
64 views

What change does this code need to include title of parent?

I'm using a function to add conditional titles to the header of the html; example below. add_filter('document_title_parts', 'change_wp_title', 20, 1); function change_wp_title($title) { global $post,...
-1
votes
1answer
44 views

How to put title slug into content when create a new post?

After finish type the title post from the title field, i want to put the slug automatically inside the content .. can i do this ? ex Title : This is just an example Permalink : example.com/this-is-...
2
votes
1answer
16k views

How can i remove JUST the title tag from wp_head() function?

i'm using wordpress 4.6 i'd like to remove just the title tag automatically outputted by wordpress because need to hardcode the html title tag in the template. i guess is something like this: ...
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 ...
2
votes
2answers
218 views

Filter the blog title displayed in the header

I wanted to filter the blog title displayed in the header to apply different CSS styles to different title parts/words, so I added the below function to my (WP 4.7) Twenty Seventeen child theme's ...
0
votes
1answer
75 views

How to remove “» (title of post or page)”?

Whenever I put a name on a post or page, it will show up in the corner of the website as such: "» (post / page title)". When I checked the code, it looks like this: <body> "» (title " == $0 (....
1
vote
2answers
2k views

Change all Post titles into [Title Case] format

I have about 2000 post with the titles in the following format: [i like apples] I want make them: [I Like Apples] I used the WP Title Case plugin, but the problem is that this plugin is only ...
0
votes
2answers
60 views

Function extending with if query in functions.php

the following function I was producing together with some users here and it is function perfectly. add_filter('wpseo_set_title', 'wpseo_set_title_callback'); $meinungen = "Meinungen zu: "; ...
1
vote
2answers
3k views

Filter get_the_title to remove certain characters?

I know that WordPress can filter shortcodes like the_content but is it possible to filter get_the_content? I have a function that is able to use substr and strpos and I know it works on the_title. I ...
0
votes
1answer
105 views

Run str_replace on title and save the output to a custom field

I need to a make a custom RSS template for my website and I'm having problems getting substr(the_title_rss(), 0, strpos(the_title_rss(), ' —')); to work on the RSS feed. What the above code is ...
0
votes
3answers
1k views

Append text after wordpress title

I would like to know is there a hook in wordpress to edit prefix and postfix of the_title in wordpress. The code in content.php the_title( '<h1 class="entry-title">', '</h1>' ); I would ...
3
votes
2answers
1k views

How can I hook into the post editor title field in order to change the HTML?

I want to make post titles mandatory in the post editor without Javascript or PHP validation, I'd like something really simple like adding the HTML "required" attribute to the post title input element....
0
votes
1answer
150 views

Setting Page Title Yoast

So I'm having a little bit of trouble with the page title. I have created a plugin which fetches product data from an API. This happens in the content. However, the title of the car (I'm fetching ...
3
votes
3answers
5k views

Modify page title format (when using title-tag)

Currently my page titles are handled by WordPress, in a call to wp_head (I have add_theme_support( 'title-tag' ) in functions.php). I'd like to change the page title format for category archives - ...
0
votes
1answer
6k views

Replace Underscore (_) on Space ( )

I use the plugin "Auto Post With Image Upload" For example I load an image with name "Image_Name" then plugin creates a post with name "Image_Name" Now the question: How to remove Underscore (_) in ...
3
votes
2answers
828 views

How to add a theme custom variable to a post title?

I'm trying to add a custom field to a post title (sample page). To do so, I'm following the instructions given in this previous question, but the variable is not appearing in the title as expected. ...
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 ...
0
votes
1answer
154 views

How to prevent WordPress from updating the modified time?

Sometimes I want to change a post a little bit, but the post was already published on my blog. The change concerns adding/removing tags or rewriting the title of the post (just to correct a ...
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['...
3
votes
1answer
68 views

WordPress i18n-friendly preg_replace post title

I've stripped Private: and Protected: from my custom post title that are forced to be private. I'm using CSS Tricks' snippet for doing so: function the_title_trim($title) { if( is_admin() ) ...
3
votes
1answer
125 views

Anyway to edit the titlebar of Wordpress Widgets in the Admin area?

I am providing a means for Mobile Widgets and Desktop Widgets in all custom widgets I am creating, so I think it would be a good idea to indicate if a widget is mobile/desktop in the title of the ...
-1
votes
1answer
281 views

Single post pagination

I have used <!--nextpage--> tag to paginate longer individual posts, These longer single posts have structure as Title, Content, A, B, C, By using above said tag, I want to paginate A, B, C ...
0
votes
1answer
81 views

conditional widget title

I have a conditional tag that looks something like this: if(is_category(3)) { // do this } else { // do that } I would like to change the widget title when the condition is true. Can anyone help ...
1
vote
2answers
393 views

Remove H1 / title / Underscore - without CSS

I have tried searching, and tried a few options, but I'm not able to remove the H1 / title / Underscore for specific pages. I don't want use CSS. I would like to remove it via functions.php or in ...
0
votes
1answer
214 views

how to get title to custom tags page

how to get title to custom tags page ? & how to make if condition like to my taxonamy if ( is_page() ) { the_title(); } elseif ( is_tag() ) { single_tag_title(); } tax: add_action( '...
0
votes
1answer
177 views

Ampersand breaking Widget title

When adding an ampersand (&) to the Text Widget title, the title breaks at the ampersand position (frontend). So: 'me, myself & I' becomes: 'me, myself ' The ampersand is being stored (...
0
votes
1answer
451 views

Wp Admin Bar Customizing Labels

I would like to replace the Label the Plugin WP Custome Area sets on the admin bar. This is the initial parto of code that sets the menu title: public function build_adminbar_menu($wp_admin_bar) { ...
1
vote
1answer
111 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()...
2
votes
1answer
1k views

get_post_field - Title without paragraph

Normally I wouldn't insert a single post with a technique like this, but sadly this project requires it. I try to call the post_title with: echo apply_filters( 'the_content', get_post_field( '...

1
3 4
5
6 7
13