Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Product title link

Topic Resolution: Resolved
product title
    • 5 years, 6 months ago Mixie
      Participant

      Hello,

      on your demo examples, titles and pictures are linked to single product page:

      https://codeless.co/specular/default/?post_type=product

      https://codeless.co/specular/shop/

      (etc.)

      On my website, however, only the picture is linked. I would like also the product title (woocommerce-loop-product__title) to be linked.

      Maybe I am just missing a setting anywhere, but I can’t seem to solve it 😅

      I tried also install a clean website for testing with only woo-commerce and then import the specular demo(s) above, but the product title (between picture and price) won’t still show up as a link.

      Thank you for your time/effort 🌻☕

      Best regards,

    • 5 years, 6 months ago Ruco
      Keymaster

      Hello,

      Please, can you share with us your wp credentials at your profile details so we check the issue closer?

      Let me know.

      Regards!

    • 5 years, 6 months ago Mixie
      Participant

      Hello Ruco,

      I updated the info. Thank you very much for your effort and take a look into it for me.

      Best regards,

      • This reply was modified 4 months, 1 week ago by Mixie.
    • 5 years, 6 months ago Mirela
      Participant

      Hello,

      This is a feature that has been changed from Woocommerce in the latest versions. The online demo has a very old woocommerce. The product title in the shop page is controlled by the plugin’s functions.
      I can’t log in in the WordPress dashboard, but I did add this hook in the functions-woocommer.php file:

      /** 
      *  Set product title as link to product page
      **/
      // define the woocommerce_shop_loop_item_title callback 
      remove_action( 'woocommerce_shop_loop_item_title', 'woocommerce_template_loop_product_title', 10, 2 ); 
      
      if ( ! function_exists( 'codeless_woocommerce_template_loop_product_title' ) ) { 
          /**
           * Show the product title in the product loop. By default this is an H2.
           */
          function codeless_woocommerce_template_loop_product_title() {
              global $product;
      
              $link = apply_filters( 'woocommerce_template_loop_product_title', get_the_permalink(), $product );
      
              
      
              echo '<a href="' . esc_url( $link ) . '"><h2 class="' . esc_attr( apply_filters( 'woocommerce_product_loop_title_classes', 'woocommerce-loop-product__title' ) ) . '">' . get_the_title() . '</h2></a>'; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
          } 
      }; 
               
      // add the action 
      add_action( 'woocommerce_shop_loop_item_title', 'codeless_woocommerce_template_loop_product_title', 10, 2 ); 

      Using the ftp credentials in your profile.
      See a screenshot of the added code: https://ibb.co/RgSRR8m

      Please refresh site and let us know.

      Best regards!

    • 5 years, 6 months ago Mixie
      Participant

      Hi Mirela,

      thank you so much, it worked. I appreciate your help with the solution very much. Sorry for the login problems, I see somehow the firewall indeed did block some login attempts from another IP.

      One little thing left: I try to use a:hover on the title links, but it doesn’t work. At this moment there is no hover at the woocommerce-loop-product__title links. Default settings would be fine enough.

      Again, thank you and have a nice day,

      Best regards,

      • This reply was modified 5 years, 6 months ago by Mixie.
    • 5 years, 6 months ago Mirela
      Participant

      Hello,

      What are you trying to do? In my side, when i hover over the title, the hand shows up. Are you not getting this?

      Let us know.
      Regards!

    • 5 years, 6 months ago Mixie
      Participant

      Yes, that is working fine. I am sorry I did not explain well, I mean a hover link color.

      • This reply was modified 5 years, 6 months ago by Mixie.
    • 5 years, 6 months ago Mirela
      Participant

      Hello,

      For that, please add this css:

      h2.woocommerce-loop-product__title:hover {
          color: #f3f3f3;
      }

      Change the color to your wish.

      Best regards!

    • 5 years, 6 months ago Mixie
      Participant

      Perfect, thank you so much for your great support and for solving everything 💐 I know I already wrote before, but I really appreciate all efforts very much!

      Best wishes,

    • 5 years, 6 months ago Mirela
      Participant

      You’re welcome :)

      If you like our theme and support, leave us a rating on Themeforest, it’s very important for us :)

      https://themeforest.net/downloads

      Thank You so much!

Viewing 9 reply threads

You must be logged in to reply to this topic.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password