Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy custom title & description migration from Yoast SEO. #420

Closed
sybrew opened this issue Mar 9, 2019 · 12 comments
Closed

Easy custom title & description migration from Yoast SEO. #420

sybrew opened this issue Mar 9, 2019 · 12 comments
Assignees
Labels
[Component] PHP [Element] Title [Impact] Growth Changes helping the plugin grow, not necessarily helping the current users. [Type] Feature Something new we need to write from the ground up.

Comments

@sybrew
Copy link
Owner

sybrew commented Mar 9, 2019

Users moving from Yoast SEO or SEOPress will find that their custom titles and descriptions have transformed into odd syntaxes, including %%title%% and %%sep%%.

We could transform this (example code below), but it's better to convert the titles into something more usable and transitional. So, we want to warn the user on the posts which still have the old syntax.

The proposal:

  1. We want to ease (and maintain) this transition.
  2. We want to show which posts are still to be transformed in the post overview tables.

This snippet covers a part of the title transformation:

add_filter( 'the_seo_framework_title_from_custom_field', function( $title, $args ) {

	$tsf = the_seo_framework();

	// Add the title. This is a bit heavy, so we test for it, first.
	if ( false !== strpos( $title, '%%title%%' ) ) {
		$title = str_replace( '%%title%%', $tsf->get_raw_generated_title( $args ), $title );
	}

	// Change separators.
	$title = str_replace( '%%sep%%', $tsf->get_title_separator(), $title );

	// Remove the sitename and pagination. TSF adds this out of the box.
	$title = str_replace( [ '%%sitename%%', '%%page%%' ], '', $title );

	return $title;
}, 10, 2 );

> Where do I place the snippet?

@sybrew sybrew added [Component] PHP [Type] Feature Something new we need to write from the ground up. [Impact] Growth Changes helping the plugin grow, not necessarily helping the current users. [Element] Title labels Mar 9, 2019
@sybrew sybrew self-assigned this Mar 9, 2019
@sybrew
Copy link
Owner Author

sybrew commented Mar 18, 2019

We might wish to warn users on these snippets for titles and descriptions via the SEO Bar.

@riffster
Copy link

Most folks that use TSF aren't very 'cody'. This might be a nice 'check-box' item for TSF with a strong warning? Just a thought :D

@sybrew
Copy link
Owner Author

sybrew commented Mar 19, 2019

I don't like advertising TSF in the admin dashboard, even less so towards other plugins.

This project will most likely be pushed into a plugin which I'd like to make available via WordPress.org. I'd also like to add an informative knowledge-base entry pointing towards it. There, it should state why you'd want the plugin & why it's only to be used as temporarily patch-work.

@sybrew
Copy link
Owner Author

sybrew commented Apr 7, 2019

Here's a list of current, deprecated, and removed variables: https://kb.yoast.com/kb/yoast-wordpress-seo-titles-metas-template-variables/

@sybrew sybrew added this to the 4.0.5 milestone Dec 1, 2019
@sybrew
Copy link
Owner Author

sybrew commented Feb 21, 2020

In b0046b7:

**Added:**
* Title and description related SEO Bar tests for unsupported transformative syntax. Mainly detecting syntax from Yoast SEO and SEOPress, making your migration to the better plugin more manageable.
	* The test runs after your filters do. So, if you've added transformative syntax filters to the right hook, you shouldn't receive any SEO Bar related errors.

The "easy" toggle will be considered for a future release.

@sybrew sybrew removed this from the 4.0.5 milestone Feb 21, 2020
@sybrew
Copy link
Owner Author

sybrew commented Aug 17, 2020

I don't want to integrate this feature in The SEO Framework: It's messy, and it'll enable users to implement an archaic system we'll need to support indefinitely. I'll face those facts in #140.

For this issue, I prefer to have the transaction take place during migration. See #548.

Doing this via migration only will not retroactively fix the titles for users that have migrated to TSF via other means. However, I believe we've been proactive about that on our migration page.

@sybrew sybrew closed this as completed Aug 17, 2020
@skullo27
Copy link

Hello, we are planning to move from Yoast so this snippet is mandatory for us to be able to move to TSF as we have 6.6k products in woocommerce! I tried the snippet and it worked fine for the <title> attribute, it does nothing for any other meta elements that were using these syntax markups from Yoast, for example: Meta Description, og:description...

Is there a way to adapt it for these as well?

@sybrew
Copy link
Owner Author

sybrew commented Oct 4, 2022

Hi @skullo27, I just released the data migration extension called "Transport." It can recognize and transform Yoast SEO syntax. To learn what's transformed, please see this FAQ entry.

@skullo27
Copy link

Hi @sybrew this is great news. You mention in that FAQ that SEOPress is coming soon, do you have an ETA? We moved from Yoast to SeoPress in the end, but it turns out that SEOPress is just as bloated : (

We would certainly move ASAP when your tool is ready for that?

thanks

@sybrew
Copy link
Owner Author

sybrew commented Oct 11, 2022

Hi @skullo27,

Development fatigue kicked in, so I felt that launching an incomplete beta version was better than pushing myself.
I hope to have SEOPress and AIOSEO support implemented before the end of this year.

@skullo27
Copy link

Hey Sybrew, I can understand that.

I wondered if you had any update on the SEOPress migration? Also, if there is a way to do it manually with something like WP All Import?

I guess as a workaround I could migrate from SeoPress to RankMath and then from RM to TSF. It would leave a lot of post meta to clean up though!!

... or just wait!

thanks

@sybrew
Copy link
Owner Author

sybrew commented Nov 23, 2022

I have already started programming the migration from SEOPress. This might take another week or two (or three).

In the meantime, you could use Yoast SEO to import from SEOPress, and then use our transporter to import from Yoast SEO. We both feature cleaning up of metadata (Yoast SEO has a feature to clean up after you migrate, TSF does this without prompt).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] PHP [Element] Title [Impact] Growth Changes helping the plugin grow, not necessarily helping the current users. [Type] Feature Something new we need to write from the ground up.
Projects
None yet
Development

No branches or pull requests

3 participants