Tagged: x
-
AuthorPosts
-
May 31, 2016 at 7:46 pm #1019142
bnorsaParticipantHi, my site works by using the X portfolio layout (which I love by the way) as a gallery and then a click on the gallery item links directly to the product in Woocommerce (photographic prints). Up until recently this has worked fine by placing the Product URL in the “Project Link: field. However for some reason this has now stopped working and when I click it just links to the Gallery (Portfolio) image.
My website is bennorsaphotography.com
I would greatly appreciate it if you could explain why this is no longer working and what I can do to fix it so that it does not happen again.
Thanks, Ben
May 31, 2016 at 11:19 pm #1019380
RupokMemberHi Ben,
Thanks for writing in! Maybe you are referring this page as I can see portfolio there – http://bennorsaphotography.com/fine-art-photography/
When I click on the item, it goes to the single portfolio item so it’s pretty expected. If you did any modification to this behavior or implemented something on other page, then kindly clarify what you did and what’s not working and where it is.
Hope this makes sense.
June 1, 2016 at 9:23 am #1020081
bnorsaParticipantHi, thanks for the response. Within the portfolio item I had in the Project Link field a link to my shop (which is not on the menu. For example if I click on a portfolio item in http://bennorsaphotography.com/fine-art-photography/
…..such as “Freycinet Driftwood, Tasmania”On click would link to this product:
However this no longer works and it just goes to the single portfolio item as you mentioned.
June 1, 2016 at 10:30 am #1020198
RupokMemberHi there,
Thanks for updating. So you are saying you did some custom development to redirect the portfolio items to products? We can’t assist on any custom code but we can have look. Would you share the code/procedure you are using to achieve this?
Cheers!
June 1, 2016 at 9:53 pm #1021376
bnorsaParticipantHi, I don’t recall this being custom code. It was achieved by placing the URL of the product in the Protfolio Item “Project Link”: field. This would take me to the product on click rather than the portfolio item.
June 1, 2016 at 10:02 pm #1021387
bnorsaParticipantIt looks like there is something in Functions PHP child theme so I don’t understand why the link is no longer working: Copied here:
<?php
// =============================================================================
// FUNCTIONS.PHP
// —————————————————————————–
// Overwrite or add your own custom functions to X in this file.
// =============================================================================// =============================================================================
// TABLE OF CONTENTS
// —————————————————————————–
// 01. Enqueue Parent Stylesheet
// 02. Additional Functions
// =============================================================================// Enqueue Parent Stylesheet
// =============================================================================add_filter( ‘x_enqueue_parent_stylesheet’, ‘__return_true’ );
// Additional Functions
// =============================================================================
add_filter( ‘post_type_link’, ‘x_remap_portfolio_permalink_to_project_link’, 10, 4);function x_remap_portfolio_permalink_to_project_link($post_link, $post, $leavename, $sample) {
if (‘x-portfolio’ == $post->post_type) {
$custom = get_post_custom($post->id);if (isset($custom[‘_x_portfolio_project_link’]) && $custom[‘_x_portfolio_project_link’][0]!=”)
return $custom[‘_x_portfolio_project_link’][0];
}return $post_link;
}add_filter( ‘woocommerce_product_tabs’, ‘sb_woo_remove_reviews_tab’, 98);
function sb_woo_remove_reviews_tab($tabs) {unset($tabs[‘reviews’]);
return $tabs;
}add_action( ‘admin_init’, ‘posts_order_wpse_91866’ );
function posts_order_wpse_91866()
{
add_post_type_support( ‘post’, ‘page-attributes’ );
}June 2, 2016 at 3:12 am #1021692
Rue NelModeratorHello There,
Thanks for the updates! It seems that the child theme is not active as of this moment. This would mean that any of your modifications will not be working because the site is using just the original theme. Please activate the child theme and test your site again.
Please let us know how it goes.
June 2, 2016 at 6:19 am #1021916
bnorsaParticipantYes, that fixed it – thanks you so much. Do I have to activate each time I update?
June 2, 2016 at 8:53 am #1022179
JoaoModeratorHi There,
Usually no, I am not sure why that happened.
Let us know if you need help with any other issue.
Thanks,
Joao
-
AuthorPosts
- <script> jQuery(function($){ $("#no-reply-1019142 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>
