-
AuthorPosts
-
February 1, 2022 at 6:00 am #1338142
Okay so I have an interesting usage of the portfolios. I am using the various categories of portfolios to sort book genres.
https://galaxypress.com/l-ron-hubbard-fiction-bibliography/
When you click on the genre you like it pulls all of the titles up.
What I am wondering is currently when you click on the book cover it goes to the portfolio page, then from there you have to click to the product page.
Example is when you click on “Green God” you get this:
https://galaxypress.com/portfolio-item/the-green-god/What I want to test is going directly to the book purchase link here:
https://galaxypress.com/product/the-green-god-paperback-9781592123605/I would need to do these redirects on some 200 products.
Where I could do it with a plugin manually, not sure if this is the best way and if Google is going to penalize the site for having so many redirects on it.
Any input on this would be very welcomed.
Thank you, Jason
- This topic was modified 2 years, 10 months ago by Jason.
February 1, 2022 at 12:01 pm #1338196Hey Jason,
Thank you for the inquiry.
There is no easy way to do this because the product URL is quite different compare to the portfolio item URL. One solution that we could think of is to add the product URL as a custom field of the portfolio item and modify the themes\enfold\config-templatebuilder\avia-shortcode-helpers\class-avia-masonry.php file to retrieve this custom field and use it as the link in place of the default one.
The link of the masonry item is set around line 1097 of the mentioned file above.
//set the html tags. depending on the link settings use either an a tag or a div tag if( $set_link ) { $lightbox_attr = Av_Responsive_Images()->html_attr_image_src( $this->loop[ $key ]['url'], false ); $this->loop[ $key ]['html_tags'] = array( 'a ' . $lightbox_attr . ' ' . $aria_label_href . $target, 'a' ); //opening and closing tag for the masonry container } else { $this->loop[ $key ]['html_tags'] = array( 'div', 'div' ); }
Best regards,
IsmaelApril 28, 2022 at 6:09 pm #1349857Dear Ismael, Thanks for the update and sorry for the late reply. I think I will manually redirect if I go this route as the above code is a little beyond my ability and comfort level. Thanks for this and in the future if it changes please let me know.
Best, Jason
April 29, 2022 at 9:10 am #1349916 -
AuthorPosts
- You must be logged in to reply to this topic.