the-seo-framework icon indicating copy to clipboard operation
the-seo-framework copied to clipboard

Opt-in for override title tag

Open HelaGone opened this issue 5 years ago • 5 comments

Right, I've a custom plugin which performs a SEO revision on the posts before they're published. It checks if the post content is long enough, if the alt text is present in the image, if the url is consistent with the title, etc. It also adds a couple of meta tags in the head tag (meta description and meta keywords). And It also has an option to write a custom title tag that is different from the post title. This is in order to provide an editorial title for the user and a SEO title for the crawlers and therefore allows to be crawled more efficiently.

Ok, with all the context in place, I encountered that your plugin also perform an override in the title tag. Which is ok, but it would be nice to have an opt-in option for those who don't want that behavior. Since my plugin was clashing with yours I had to modify the core code of your plugin in order to allow mine to perform its intended functionality

I'm not sure if there are more plugins or people that is overriding the title tag with its own plugins or custom functions. But it woud be helpful to have an option to prevent your plugin from override the title tag.

Hope this make sense to you

HelaGone avatar May 17 '19 17:05 HelaGone

meta keywords

What is the reason for using meta keywords? They are not used by search engines. Is there some engine that takes them into account? Last time I checked using them was even harmful.

But it woud be helpful to have an option to prevent your plugin from override the title tag.

Looking at #158, something like this should work (untested):

add_action( 'the_seo_framework_init', function() {
		add_filter( 'the_seo_framework_overwrite_titles', '__return_false' );
} );

As @sybrew noted, it is JIT filter so it won't affect admin screens. Let me know if it works for you, cheers!

LeBaux avatar May 17 '19 18:05 LeBaux

"JIT" wasn't the best wording I could've used, but it is true: The filter doesn't affect the admin screens.

For this filter to work as you and I intend it to, we'd want to disable title-related HTML fields, too. Moreover, we'd want to add options for each post/taxonomy type whether it TSF's titles should be effective, much like you're suggesting.

The main issue with this is that it's very advanced, and our HTML implementation currently doesn't allow for easy advancements in this. Substantially, we want to truly generate HTML fields, instead of manually writing them out.

This is something I've been working on for the past three years; but, we're finally getting close to this. The Extension Manager is already capable of this, but that's on a whole new level.

Related: #371

sybrew avatar May 19 '19 09:05 sybrew

@LeBaux It seems that your solution actually works. Thanks a lot! And about the meta keywords. . . well, it's not up to me. There is a SEO department whom says it's a good practice to have them.

HelaGone avatar May 21 '19 17:05 HelaGone

There is a SEO department whom says it's a good practice to have them.

Then I'd like to have a good word with them 😅

Google's statement: https://webmasters.googleblog.com/2009/09/google-does-not-use-keywords-meta-tag.html

Bing's statement: https://blogs.bing.com/webmaster/2014/10/03/blame-the-meta-keyword-tag

sybrew avatar May 21 '19 18:05 sybrew

With the newly proposed interface, we should consider having togglable option groups. e.g., if a user has disabled the sitemaps via a toggle, all sitemap options will be hidden.

The same goes for the title settings.

With the current state of the admin interface, this is not feasible.

sybrew avatar Feb 20 '20 16:02 sybrew