Skip to main content

Questions tagged [get-the-title]

This function will return the title of a post for a given post ID.

0 votes
0 answers
16 views

We tested WooCommerce and decided not to use it. After uninstalling it I repurposed a test page (sample-page) to be used as a content page.. but the title shows 'My Account: Sample Page' even though ...
revive's user avatar
  • 235
0 votes
1 answer
71 views

I have set my WordPress' Website title and tagline in the settings, but it's not showing in any browser tab. It only shows the website URL in the tab. When I check the source code, the tag is blank I ...
Maddie's Fansites's user avatar
0 votes
1 answer
105 views

I would like to add an html element right before the title of the blog posts. The code I'm using is as follows: function add_html_above_title($title, $post_id) { if (is_single() && $...
s.sufi's user avatar
  • 3
2 votes
1 answer
276 views

I want a simple function to display image titles and captions alongside each other below the images on wordpress posts and pages. All the answers I have seen do not work for me. Either they leave the ...
Anand Prakash's user avatar
0 votes
1 answer
114 views

I am looking for a custom function to auto generate a post title/slug for a specific CPT from two taxonomies and one custom field, created with ACF Pro. Auto generation should be done only when the ...
austriadesign's user avatar
0 votes
1 answer
55 views

So I would like to replace the entire title of posts in WordPress bases on user behaviuor and role. Please note that I would like to replace the entire post title and not the prepend or append text to ...
Boris Smolyanov's user avatar
0 votes
0 answers
197 views

function get_post_data(){ $post_id = $_POST['post_id']; ... $data['title'] = get_the_title( $post_id ); ... $data['excerpt'] = get_the_excerpt( $post_id ); ... ...
Tom's user avatar
  • 13
0 votes
0 answers
249 views

I am using the_title filter to add an HTML snippet under the title, as follows: I only want the output to happen for the main title in the posts or page view. That's why I added an early return to ...
Álvaro Franz's user avatar
0 votes
1 answer
417 views

I've coded a shortcode to add manually to specific post title fields so i can style part of a title add_shortcode( 'green', 'green_shortcode' ); function green_shortcode( $atts, $content = 0 ) { $...
Brad Dalton's user avatar
  • 6,995
0 votes
0 answers
44 views

I want to display the Recent Posts Widget title on a page, however I could not find a solution yet. I dont want to display the recent posts on the page only the title of the most recent posts widget, ...
Simó Tamás's user avatar
1 vote
0 answers
91 views

I modified the site title the 'the_title' filter. I am using ACF pro repeater, I want to achieve is that if there is content in the repeater a + will be added to the post title. I wrote this script: ...
DavSev's user avatar
  • 143
0 votes
1 answer
151 views

I Need to Trim the h2.entry-title, including whitespace and special character Only On Homepage, Category Pages, and Tag Pages. (eg. Gowland Remote Control Car – RC Cars Xmas Gifts) I Need All Titles ...
Vikral's user avatar
  • 1
0 votes
1 answer
350 views

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
  • 484
0 votes
1 answer
2k views

I am working on a website, and I am using Polylang to translate it to a different language. In my code I want to get a page title, and display it. My issue is I cannot get it by ID or page_by_path ...
Simó Tamás's user avatar
0 votes
1 answer
1k views

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 ...
Still Ready's user avatar

15 30 50 per page
1
2 3 4 5
8