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

Related Products Woocommerce

    • 7 years, 8 months ago estar
      Participant

      Expired

      I am trying to display related 4 products in one line, the code in functions-woocommerce.php seem to be correct by default even though I cannot see how this could give me 2 columns if set to 1?

      woocommerce_related_products(array( ‘posts_per_page’ => 4 ),1); // Display 4 products in rows of 2

      EYE & LIP BALM

    • 7 years, 8 months ago Mirela
      Participant

      Hello,

      Please go to file wp-content\plugins\woocommerce\includes\wc-template-functions.php and find this function:
      function woocommerce_cross_sell_display( $posts_per_page = 2, $columns = 2, $orderby = 'rand' )
      edit post per page and columns value from 2 to 4. Save changes and refresh cart page.

      Let us know.

      Best regards!

    • 7 years, 8 months ago estar
      Participant

      Expired

      This reply has been marked as private.
    • 7 years, 8 months ago estar
      Participant

      Expired

      1 more thing, for some reason the sticky navigation does not appear either

    • 7 years, 8 months ago Mirela
      Participant

      Hello,

      –Woocommenrce:
      Yes, indeed will be overwritten in case of a plugin update. So it is recommended that you keep a copy of the edited file as backup. Since it is a file directly at the plugin folder and not overwritten/customized by theme. Sorry but as mentioned, this is not one of the woocommerce files inside theme folder. We can not do anything about them as they are created by another author.
      I tried login in but the username is not valid. Can you please double check?

      –Footer menu:
      If you see here: https://postimg.org/image/8k4fpia68r/ The copyright is indeed in the center of the section. But the menu has further padding that is pushing it at the right. So the custom css should target the menu directly. Try adding this code into your custom css box:

      #copyright .copyright_text ul.footer {
          margin-left: -45px !important;
      }

      Change the value to your wish.

      –Sticky nav:
      Did you set it on at Header Options > Sticky Nav? The type of header you have chosen keeps only the logo in the sticky nav. Not the menu. This is the header’s default style. If you do not like it, you can chose another style or customize it yourself. Please know that personal preference customization is not included in support.
      Let us know.

      Best regards!

    • 7 years, 8 months ago estar
      Participant

      Expired

      This reply has been marked as private.
    • 7 years, 7 months ago Mirela
      Participant

      Hello,

      In the same file wp-content\plugins\woocommerce\includes\wc-template-functions.php in this section:

      function woocommerce_output_related_products() {
      
      		$args = array(
      			'posts_per_page' => 2,
      			'columns' 	 => 2,
      			'orderby'   	 => 'rand',
      		);
      
      woocommerce_related_products( apply_filters('woocommerce_output_related_products_args', $args ) );
      	}
      }

      I edited out the value ‘2’ to ‘4’. Please check your products. The relted products are showing in 4 columns.

      Best regards!

    • 7 years, 7 months ago estar
      Participant

      Expired

      AWESOME!!!!!! THANK YOU!!!

Viewing 7 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