Redirect Attachment Page Code & Plugins not working
-
Hello @Richard,
I want to redirect my attachment pages, since it seems like they're pretty bad for SEO.
I have tried the Method 2 that's described in the link below, and various other methods (plugin & various suggested custom codes) but nothing has worked so far.
Here's the description of what I mean:
https://www.wpbeginner.com/wp-tutorials/how-to-disable-image-attachment-pages-in-wordpress/This is the plugin I tried that didn't work:
https://wordpress.org/plugins/attachment-pages-redirect/Yoast is mentioned a lot to solve this problem too, but after reading that this plugin is also not compatible with Lay Theme I have deinstalled this again.
How is it possible to achieve this redirect with Lay Theme?
And also, I know this has been asked a couple of times, but is there really no SEO plugin that's compatible with Lay Theme? I agree with the person who suggested keeping a list of plugins for "basic" functions like SEO or GDPR that actually work with Lay Theme. It's very time consuming and frustrating to have to research this time and time again only to then find out that the plugin one has downloaded or even bought is not working with Lay Theme.
Please get back to me soon about this.
Thanks! -
Dear @Bella
Thank you for such a good explanation. ✨
Because this method of removing attachment pages requires you to change Lay Theme's source code I will refer this to Armin for a better answer.
I would not recommend adding new .php files or changing existing ones. ( also they will be removed every time you update your Theme )
I also agree that their should be better instruction on the use of Lay Theme with SEO, given that YOAST is not available at this time.
I know this is not the immediate answer Bella you were probably looking for, so thank you for your patience while this is being answered. 🌝
Sincerely
Richard
-
hey what exactly would you like to achieve with the redirect?
would you like to redirect any attachment page to your frontpage?yoast works with lay theme. it just doesnt recognize the text in the gridder so it says there is no text on the page.
but google finds that text and other than that creating meta tags with yoast works as far as i know.why are attachment pages bad for seo?
afaik seo is just about the kind of text you have on your page and alt tags and meta tags. all of this you can do with lay theme, just individual meta tags for individual pages is not supported.
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it