Setting a Custom SEO Title Using Yoast Wordpress SEO API

0 votes

I've just installed this plugin on my site and it means that my custom titles that were previously set no longer work. Here's the link to the brief Wordpress SEO API doc: [http://yoast.com/wordpress/seo/api-docs/]

Previously, I did this:

$pagetitle = '' . $design['name'] . ' | Free Design from My Site';

I have a custom URL rewrite that takes a WP page /design/ and appends the design name to /design/design-name so now I've installed WP SEO, the page title is whatever the title of /design/ is and isn't specific.

According to the docs in the link above, I tried this:

function wpseo_design_detail_title($pagetitle) {
$pagetitle = $design['name'] . ' | Free Web Template from My Site';
}
add_filter( 'wpseo_title', 'wpseo_design_detail_title' );

That does remove the previous /design/ title but instead it just has the sites URL (i.e. the page title is blank).

What am I missing ?

Mar 10 in Digital Marketing by Kichu
• 15,450 points
48 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Digital Marketing

0 votes
1 answer

How to over-ride meta data in Wordpress, using Squirrly SEO

if (is_archive()){ add_filter('sq_title', 'filter_product_wpseo_metadesc'); function filter_product_wpseo_metadesc($wpseo_metadesc){ ...READ MORE

answered Mar 1 in Digital Marketing by narikkadan
• 7,860 points
33 views
0 votes
1 answer

How to remove home page title in Yoast SEO?

Here, you have two possibilities. You can ...READ MORE

answered Mar 4 in Digital Marketing by narikkadan
• 7,860 points
76 views
0 votes
0 answers

Calling Yoast SEO title in widget not work

I just install Wordpress SEO plugin by ...READ MORE

Mar 4 in Digital Marketing by Kichu
• 15,450 points
13 views
0 votes
0 answers

How to over-ride meta data in Wordpress, using Squirrly SEO

I currently have a Wordpress website using ...READ MORE

Mar 4 in Digital Marketing by Kichu
• 15,450 points
13 views
0 votes
0 answers

SEO indexing fails with lazy load images using Intersection Observer API

To improve my site performance I'm trying ...READ MORE

Mar 5 in Digital Marketing by Kichu
• 15,450 points
29 views
0 votes
0 answers

Wordpress Plug-ins: How-to add custom SEO friendly URL Handles

I was wondering if its possible to ...READ MORE

Mar 5 in Digital Marketing by Kichu
• 15,450 points
35 views
0 votes
1 answer

Trying to call AWS API via PHP

Try using AWS SDK for PHP, Link ...READ MORE

answered Jun 6, 2018 in AWS by Cloud gunner
• 4,650 points
959 views
0 votes
1 answer

How to use Blockchain receive API without exchange rate?

Your code contains the amount in USD ...READ MORE

answered Aug 21, 2018 in Blockchain by Perry
• 17,100 points
276 views
0 votes
1 answer
0 votes
0 answers
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP