WordPress Image Control: Difference between revisions

Line 61: Line 61:
*****If the redirect for an Image Attachment Permalink includes a "hash" ( # ) to scroll to a specific location on a page, the format is: <nowiki>https://WhatEverWebSite/WhatEverPage/#WhatEverLocation</nowiki> (WordPress manipulates the URL from the "classic" HTML where it is: <nowiki>https://WhatEverWebSite/WhatEverPage#WhatEverLocation</nowiki> (with no forward slash ( / ))
*****If the redirect for an Image Attachment Permalink includes a "hash" ( # ) to scroll to a specific location on a page, the format is: <nowiki>https://WhatEverWebSite/WhatEverPage/#WhatEverLocation</nowiki> (WordPress manipulates the URL from the "classic" HTML where it is: <nowiki>https://WhatEverWebSite/WhatEverPage#WhatEverLocation</nowiki> (with no forward slash ( / ))
****...and from there, and Image could be opened in a lightbox, etc.
****...and from there, and Image could be opened in a lightbox, etc.
****Yoast and other SEO tools can do this, but it also removes the tools ability to create an indexes from images.
***For Plugins like Timeline Express that have delayed rendering which affect Fragment Location / Anchor scrolling, additional steps have to be taken.
***For Plugins like Timeline Express that have delayed rendering which affect Fragment Location / Anchor scrolling, additional steps have to be taken.
****To redirect Image Permalinks to specific Pages, start with the step from above;
****To redirect Image Permalinks to specific Pages, start with the step from above;
Line 86: Line 87:
</script>
</script>
</syntaxhighlight>
</syntaxhighlight>
***Ideally the landing page for an image obtained from a search engine should have a page that says, "Here is the image by itself.  And here is the link to the actual location on another page"
****
****OR
***Use the below "Parent Redirect" method, then a Plugin that does "After Page Load", "Smooth Scroll to position"
****This can include Lazy Loading, Page Animation while Loading.  However, Lazy Load (like a3 Lazy Load, Smush, etc.) can break functionality of specialty image plugins like Magic Zoom (because they have their own lazy load feature)
***...or redirect image to intended location instead of the Permalink URI
****'''Redirect''': Tools, Redirection; This provides a simple list of redirects.  Some Plugins like Timeline Express have delayed rendering which will affect Fragment Location / Anchor scrolling
****'''Attachment Pages Redirect with Media Library Assistant''': https://wordpress.org/plugins/attachment-pages-redirect/: Redirects Permalink URI to a Page, etc (Permalink of Page, etc.)
*****One great remaining thing would be to not only redirect to the page, but also use a # to scroll to the appropriate point on the page.  Since most Anchor Tags are defined by the ID Attribute or the Name Attribute, it should work.
*****A permalink redirect to an absolute URL with an Anchor Tag would be nice: https://www.lifeofthesaltonsea.org/recent-history/#apr-1962
******Smooth Scroll to Anchor: https://wordpress.org/plugins/easy-smooth-scroll-links/
******Page Scroll to ID: https://wordpress.org/plugins/page-scroll-to-id/
******
****Yoast will do this, but it kills off it's ability to create an Image Index
****All in One SEO will do it to, but not sure about having both it and Yoast installed
****In the image.php (Wordpress or Theme?) file: <code><?php wp_redirect(get_permalink($post->post_parent)) ; ?></code>
****A really complex idea would be to use the Attachments Pages Redirect, Media Library Assistant (to define Parent), and some PHP code to create a URL "on the fly"
****
****
**Plugin that can change ALT information based on existing information (many plugins have this capability, but require buying the PRO version)???
**Plugin that can change ALT information based on existing information (many plugins have this capability, but require buying the PRO version)???