2
votes
2answers
143 views

How to count the length of a post title?

Let's say that I have an entry titled Crime & Punishment I tried to count the number of characters of my entry titles using the following line: echo strlen( get_the_title() ); I expected the ...
0
votes
0answers
31 views

Custom field in title

I'm trying to change the posts with no titles to 'custom field' + 'mystring'. So far I got this code. add_filter( 'the_title', 'ta_modified_post_title'); function ...
1
vote
1answer
180 views

Customized title tag for each page in pagination?

With the reference of below questions. How to change title tags on paginated posts? Paginate tags page How to change title tags on paginated posts? Add Page number to Meta Description in Wordpress SEO ...
8
votes
3answers
1k views

How to change the case of all post titles to “Title Case”

I am helping my father with his WordPress website. It has over 1,700 posts with TITLES IN UPPERCASE. We'd like to change these to "Title Case" in the database (possibly using this PHP script). The ...
1
vote
0answers
150 views

posts-2-posts embedding post title of connected posts

I'm trying to create a default title for all the posts that are created, the title is generated by a couple of things, such as the post fields. I was able to write code for getting the post fields ...
0
votes
1answer
150 views

Getting a specific “title for a section” only on Startpage?

I have a website which shows alle posts from my wordpress on the startpage. thanks to Stephen Harris who helped me with this code I put in the functions.php: ...
0
votes
1answer
121 views

Change page title from page using php via php executed from page/post itself

I am running a plugin from a WP page to execute PHP and it works great. I'd like to edit the page title and description based on POST data. I am already using POST data in the PHP code to alter the ...
0
votes
2answers
214 views

How can I remove the first two words and shorten get_the_title()

Some of my posts' titles have leading words, followed by a colon. I am removing the leading words and the column of every post title in the loop with the following: <?php $title = ...
0
votes
1answer
633 views

Echo title attribute php

I have the following in functions.php: function twentyten_continue_reading_link() { global $id; return ' <span class="readmore"><a href="'. get_permalink($id) . '" title="' . ...
0
votes
2answers
371 views

Insert content into <title> head tag with function

Is there a hook available that lets you append or prepend text to the <title> tag in the head? I've seen lots of posts about customizing the <title> tag, but they all involve manually ...
1
vote
1answer
545 views

Add title, post content, and category like add_post_meta and update_post_meta

How can I update/add a new title, post content, and category to a post with hard PHP code similar to add_post_meta(), update_post_meta()?
0
votes
1answer
284 views

How do I choose not to display the title header on a specific page?

I would like to have one specific page on my WordPress blog omit the header . Is there a way to wrap that title code from page.php in my WordPress theme in an if clause that specifies the page I do ...
2
votes
1answer
198 views

Browser title script ignoring is_page /else conditional [closed]

I've used this code to stipulate different separators for different pages in my clients site: <title> <?php if(is_page('Portfolio')){ wp_title( 'of', true, 'right' ); echo ...