• Resolved dentalstyling

    (@dentalstyling)


    Hi everybody.

    Since I stumbled into this yesterday and found no informations around after much googling, I thought it would be good to share my experience and the solution to this issue.

    I run Parabola theme together with Wwoocommerce plugin, and after some tweaking around I’ve reached a decent degree of compatibility between the 2. I had but last issue to get solved.

    As you have probably already noticed, Parabola theme wraps the Featured image you set inside the article inside a link to that article. Meaning that if you click the image, you reload that article.

    Now: Woocommerce ( I am using Version 2.3.8 – latest so far) tends to wrap featured images (which are set as Products’ images) and gallery images inside the prettyPhoto gallery tool which is a sort of lightbox-like gallery to nicely preview all images inside that product page.

    Obviously the Featured image did not get wrapped inside prettyPhoto tag due to the above mentioned Parabola’s behaviour.

    The solution is pretty simple:

    you just have to uncomment putting // just before where it says $html = '<a href="' . get_permalink( $post_id ) . '" (second line here) inside parabola/includes/theme-loop.php found at the bottom of the php file or just copy-paste this code down here.

    /**
     * The thumbnail gets a link to the post's page
     */
    function parabola_thumbnail_link( $html, $post_id, $post_image_id ) {
        // $html = '<a href="' . get_permalink( $post_id ) . '" title="' . esc_attr( get_post_field( 'post_title', $post_id ) ) . '">' . $html . '</a>';
         return $html;
    }; // parabola_thumbnail_link()
  • The topic ‘Parabola/Woocommerce featured image issue’ is closed to new replies.