Linking portfolio thumbnail to my own URL

Hi there, is it possible to link the Portfolio page thumbnail to a page of my choice rather than the portfolio interstitial page?

Hi @mksubherw,

Thanks for reaching out.
You can add an external link to the Portfolio item using the Project Link option in the Portfolio item. Once you add the link, please use the code in the following thread.

NOTE: Please remember that the code in the reference thread is sample code, and it varies from case to case, and we can’t be guaranteed it works for you.
Thanks

Thanks so much Tristup. I tried copying and pasting the code and adding to the Project Link field, but no luck. I am seeing a weird error at the top of the child theme page “theme is broken” – any help on what I should do?

Hello @mksubherw,

There is a typographic error in the code. You should be adding this line:

add_filter( 'post_type_link', 'x_remap_portfolio_peprmalink_to_project_link', 10, 4);

Be very careful with the single quotes, double quotes and any other characters that may break the code or your site.

Best Regards.

Hi @ruenel, thanks for the help! I tried that but nothing seems to have changed in terms of linking to a URL. Any other suggestions?

(side note: I also can’t tell the difference between the code you told me to add and the previous code I had screenshoted, the quotes seem right to me hmmm).

Hello @mksubherw,

All the characters in that line is all in black which should not be the case.

To better assist you with your issue, please provide us access the site so we can investigate it. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Best Regards.

Ok - just added a secure note. Thank you so much! hope it’s not a difficult fix.

Hello @mksubherw,

The child theme is broken. Your style.css file should contain something like this:

/*

Theme Name: X – Child Theme
Theme URI: http://theme.co/x/
Author: Themeco
Author URI: http://theme.co/
Description: Make all of your modifications to X in this child theme.
Version: 1.0.0
Template: x

*/

I also have taken closely at the PHP codes added in your child theme’s functions.php. Though, the error that that I have pointed out has been corrected already, your issue cannot be resolve because the given code do not add a link to your portfolio. Perhaps this old thread can help you:

Kindly let us know how it goes.

Hi @ruenel - I appreciate you taking a look. The recommended plugin on this page worked!

Also - this is unrelated but how can I fix the child theme issue?

Hi @mksubherw,

I went ahead and added the CSS file header referred by my colleague Runel in his post into the style.css file, and the child theme is now fixed.

Thanks

Excellent @tristup! you guys rock.

Hi @mksubherw,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.