Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1019142
    bnorsa
    Participant

    Hi, 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

    #1019380
    Rupok
    Member

    Hi 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.

    #1020081
    bnorsa
    Participant

    Hi, 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:

    Freycinet driftwood, Tasmania

    However this no longer works and it just goes to the single portfolio item as you mentioned.

    #1020198
    Rupok
    Member

    Hi 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!

    #1021376
    bnorsa
    Participant

    Hi, 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.

    #1021387
    bnorsa
    Participant

    It 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’ );
    }

    #1021692
    Rue Nel
    Moderator

    Hello 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.

    #1021916
    bnorsa
    Participant

    Yes, that fixed it – thanks you so much. Do I have to activate each time I update?

    #1022179
    Joao
    Moderator

    Hi There,

    Usually no, I am not sure why that happened.

    Let us know if you need help with any other issue.

    Thanks,

    Joao

  • <script> jQuery(function($){ $("#no-reply-1019142 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>