The tag has no wiki summary.

learn more… | top users | synonyms

2
votes
1answer
231 views

How to add terms to a post depending on its title?

I want to add all posts with keyword "Dog Training" in the post title to a specific category. Reason: If you enter something into WordPress search it's not an exact match. Previous WordPress search ...
5
votes
4answers
18k views

query_post by title?

is it possible to create a loop of posts using WP_Query or query_posts using the title? ie $args = array('post_title'='LIKE '.$str.'% '); $res = WP_Query($arg); // the loop... // trying this ...
3
votes
2answers
516 views

Copy a Taxonomy Term into the Post Title for a certain Custom Post Type

I am using Gravity Forms to allow users to create posts from the front end. However, the way this site I am building is going to work, one specific Post_Type is essentially just a "Data" post. There ...
1
vote
1answer
199 views

How can I list recent posts excerpts?

I am using this directly from the codex to list 3 recent articles titles. <ul> <?php $args = array( 'numberposts' => '3'); $recent_posts = wp_get_recent_posts( $args ); foreach( ...
3
votes
4answers
3k views

Force post slug to be auto generated from title on save

I'm running a property site where many properties are sold in apartment blocks. Because of this what the content editors do is create a post/property with all the details and then use a duplicate ...
5
votes
4answers
13k views

How to get current-menu-item title as variable?

Is possible to get current-menu-item as a php variable? I'm listing the category museums via the menu item 'museums we support' so i'd like the get 'museums we support' bit and display it somewhere? ...
6
votes
1answer
4k views

Change page title in admin area

Is there someway to change the title in wp-admin? Been looking all over google but no one seem to mention it. I simply want to get rid of "— WordPress" and possibly change the "‹" into ...
0
votes
2answers
461 views

How to display page title+link of page created by user

I want to check if user is logged in and if have created a page. If so, option 1 is shown. This all works fine. But how to display page title+link of page created by that user between {page title ...
2
votes
2answers
896 views

Disallow Same Post Title

I am looking for some code where member can't use the same title as another post already having or used. e.g if there is a post with title "Amazing Australia Tour" than it should not allow to use the ...
2
votes
2answers
1k views

How to remove “Taxonomy name:” from wp_title

The wp_title-generated <title> in my custom taxonomy archive pages contains the singular taxonomy name with a colon. I can't figure out where this is coming from (or if it's default Wordpress ...
1
vote
1answer
543 views

Set post title from two meta fields

In a custom post type I have post titles disabled, however in the list of posts and in the slug it just shows the title as "auto-draft". I want to automatically take two pieces of post-meta and make ...
0
votes
1answer
80 views

Checking for existence of a page by title?

I'm currently working on a plugin, and I essentially want to check if a certain page has been created. Essentially, I want to do something like this: if (file_exists($file)) { $exists = ...
0
votes
1answer
574 views

Custom title widget / HTML encoding

I'm not the first person who has battled the matter of WordPress stripping HTML from widget titles. There are a number of custom widgets out there that allow you to add e.g. links to titles, but I ...
0
votes
2answers
1k views

Search Post Title Only [duplicate]

I'm using the standard WordPress search form to search a custom post type. Here is my code: <form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>"> ...
0
votes
2answers
255 views

Cannot use 'CSS' in post title

Issue? Whenever I use the term 'CSS' in a post title, the rest of the title (after the term 'CSS'), is inserted at the top of the single post page. What steps will reproduce the problem? 1. Create a ...
1
vote
2answers
1k views

Custom Post Type with Custom Title

I have a custom post type without title support and I'm trying to generate one from post's taxonomies and custom fields. To do so, I'm using this code: function custom_post_type_title_filter( $data , ...
5
votes
1answer
10k views

Translate widget titles using qTranslate plugin

I'm actually using the qTranslate plugin to translate my website. It works really well with everything except one thing. the titles of my sidebar widgets. Actually, to translate some words we need to ...
3
votes
3answers
5k views

How do I get a post (page or CPT) ID from a title or slug?

I've scoured the Codex, failed to get get_page_by_title() to work and am quite surprised that there doesn't seem to be a standard WP function for this task. I need to get the ID of any given post/ ...
2
votes
2answers
3k views

When calling wp_title(), do you have to create some kind of “title.php” file?

... or does wp_title() already handle the various contexts in your blog? This could clarify for me how I can achieve a reusable index.php file without having all the conditional statements inside it ...
1
vote
1answer
1k views

Setting a title on a Custom Post Type that doesn't support titles

I have a CPT called "profile" that only supports the editor and thumbnail. Each user is limited to posting just 1 profile. I'm looking for a way to prefill the title and slug fields with the display ...
3
votes
1answer
155 views

Fill post titles from post content?

I imported over 1000 posts from a Tumblr gallery. All the posts are untitled, but each has a photo and name inside of the post. How do I make take the content of each post and make it the post name?
3
votes
3answers
2k views

How to correctly get post type in a the_title filter

I want to prepend text to the post titles of a specific custom post type, but the filter below didn't work. Instead of changing only that CPT's post titles, it changed all titles on the given CPT's ...
2
votes
2answers
332 views

Filtering 'the_title' with option to return subhead?

Problem: The WordPress iPhone app (and other WordPress-related smartphone apps) do not allow for much other than the Title and Body fields (i.e. no access to custom fields). Goal: My current ...
2
votes
3answers
701 views

Filter to modify post_title after image upload?

When I upload images, Wordpress 3.4.2 sets the Title to the base of the filename, such as "DSCN1234" or "IMG_1234". I'd like the Title to be left blank. The code that sets the Title during the upload ...
1
vote
1answer
313 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 ...
1
vote
2answers
2k views

wp_title() empty on a static front page

I'm trying to use wp_title() to create a heading for my pages, but I'm using a static front page and, while all of the other pages render the title properly, the front page won't. This is what I'm ...
0
votes
1answer
548 views

Require title for pages

Is there a way to force users to write a page title before publishing? I have found example of requiring post titles, but not page titles.
0
votes
1answer
205 views

Change Default Custom Fields Metabox Name

I found that the title of the meta box cannot change via the cctm plugin. It shows "Custom Fields" as default, which is pretty annoying to see. Image So I decided to change it in function.php, here ...
-1
votes
1answer
179 views

Manually Insert Title & Meta Description for Pagination pages?

This is second version of question Customized title tag for each page in pagination? answered by @joostvanhoof . I would like to add customized title tag <title> and different meta description ...
4
votes
2answers
7k views

How to get permalink and title from post ID?

I have stored an array of post IDs and I would like to list the posts as links, meaning I need to get the title and permalink for the post ID - $id. The list should be echoed out by the following if ...
3
votes
4answers
843 views

How I check if the same post slug has not been used before publishing?

For an indie rock agenda I created event posts. With the help of javascript, the custom fields values (bands, places and date info picked in select boxes) are copied as the post title when publishing ...
3
votes
3answers
1k views

Set Custom Post Type title to the Post's Date

I have a custom post type, called 'status' and I have disabled 'title' in the post type. Right now it's setting all posts to have the title "Auto Draft". I want to set up a way to set the title to be ...
2
votes
1answer
315 views

Display post title on individual image attachment page

How to display parent post title on individual image attachment page heading of the post gallery? Currently, it shows image name as page heading on image attachment page. Any help appreciated. Thanks ...
1
vote
1answer
338 views

Include category title in wp_title

I'm using this in functions.php to output my page <title>: /** * Creates a nicely formatted and more specific title element text * for output in head of document, based on current view * * ...
1
vote
2answers
317 views

Short_title character problem

I am using this code to shorting the title: function short_title( $after = '', $length ) { $mytitle = get_the_title(); if( strlen( $mytitle ) > $length ) { $mytitle = substr( ...
1
vote
1answer
3k views

Setting title using wp_title filter

I want to do something very simple but I'm stuck finding where in WordPress I need to perform this. When someone on my WordPress site visits a blog post page I want the title in the blog post to ...
1
vote
2answers
2k views

Verify if tag is used on posts

I'm using site tags for a glossary. I would like to display a link to the tagged page if the tag exists, otherwise just display the tag title. Is there a check which would allow me to determine if the ...
0
votes
1answer
361 views

How to set “lang” attribute for post/page title?

I am creating multilingual website in Urdu & English lanugage on Wordpress. Major part of site is in English. Only article's body (i.e paragraph & headings etc) are in Urdu. To assign Urdu ...
0
votes
1answer
313 views

Custom Post Title as search term

is there any way to include custom post title as search term. I create custom post types - VHS, DVD, Blu Ray. Then in search box when I write DVD I want to list all posts from custom post type DVD. ...
0
votes
2answers
126 views

Wordpress page title repeated in SOME pages

I have created a Wordpress site and titles were working just fine. Then, some time and plugins installed later, I noticed that in SOME pages I get the title repeated 2 times. Example of wrong page ...
0
votes
1answer
2k views

get_page_by_title() not returning anything [closed]

I'm trying to use get_page_by_title() to get the value of a parent custom post type through Gravity Forms. Basically a patient name is stored in a custom post and their patient id is the post title ...
0
votes
1answer
103 views

Take excerpt of the content of the post and send it as the title to create new post

Explaining my goal: I would create the title by taking the first words of the post content. Ex: In the Admin interface would be the title field blank and the first 10 words of content would be sent as ...
-1
votes
1answer
2k views

Add a Span Around a Product Title in WooCommerce [closed]

I'm customizing a custom theme to use WooCommerce. One of the issues I've run into is adding a span tag around a product title on the single product page. I've figured out how to add a filter to the ...