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

Food Menu Add to cart

#menu #cart #woocommerce
    • 6 years, 7 months ago eisalita
      Participant

      Is there any way to add an “add to cart” button on each food menu?

    • 6 years, 7 months ago Ruco
      Keymaster

      Hello,

      Yes, but you have to make lot of customization to this file: \codeless_builder\shortcodes\cl_menu_tabbed.php

      Why you don’t use the shop products instead of the menu ?

      Regards!

    • 6 years, 7 months ago eisalita
      Participant

      I was able to add a plugin already. My question is, is there a way to make the right side a bit smaller so the food menu has wider space? See https://traiteurninis.com/residential/

    • 6 years, 7 months ago Ruco
      Keymaster

      Hello,

      Yes there is a way to do that by edit \includes\codeless_builder\shortcodes\cl_menu_tabbed.php file:

      <div class="single-menu-container col-sm-6">
      				<?php
      			                                
      			    // Loop counter
      			    $i = 0;
      			    codeless_loop_counter($i);
      
      			    // Start loop
      			    if ( is_object($the_query) && $the_query->have_posts() ) :
      			    	
      				    while ( $the_query->have_posts() ) : $the_query->the_post();
      				        
      				        codeless_loop_counter(++$i);
      				        $active = '';
      
      				        if( $i == 1 )
      				        	$active = 'active';
      				                                    
      				        ?>
      
      				        <div class="single-menu <?php echo esc_attr( $active ) ?>" id="cl_single_menu_<?php echo esc_attr( get_the_ID() ) ?>">
      
      				        	<?php 
      
      				        		$content 	= get_the_content();
      
      								echo apply_filters('the_content', $content );
      
      				        	?>
      				            
      				        </div>
      
      				        <?php
      				            
      				    // End loop
      				   endwhile; 
      				     wp_reset_postdata();
      
      				endif;
      			    
      			    ?>
      			</div><!-- .single-menu-container -->
      
      			<div class="tabs-container col-sm-4 col-sm-offset-2">
      				

      and replace the code from line 21 to 65 with:

      <div class="single-menu-container col-sm-8">
      				<?php
      			                                
      			    // Loop counter
      			    $i = 0;
      			    codeless_loop_counter($i);
      
      			    // Start loop
      			    if ( is_object($the_query) && $the_query->have_posts() ) :
      			    	
      				    while ( $the_query->have_posts() ) : $the_query->the_post();
      				        
      				        codeless_loop_counter(++$i);
      				        $active = '';
      
      				        if( $i == 1 )
      				        	$active = 'active';
      				                                    
      				        ?>
      
      				        <div class="single-menu <?php echo esc_attr( $active ) ?>" id="cl_single_menu_<?php echo esc_attr( get_the_ID() ) ?>">
      
      				        	<?php 
      
      				        		$content 	= get_the_content();
      
      								echo apply_filters('the_content', $content );
      
      				        	?>
      				            
      				        </div>
      
      				        <?php
      				            
      				    // End loop
      				   endwhile; 
      				     wp_reset_postdata();
      
      				endif;
      			    
      			    ?>
      			</div><!-- .single-menu-container -->
      
      			<div class="tabs-container col-sm-4">
      			

      So practically i have changed the col-sm-6 to col-sm-8 and removed the col-sm-offset-2 from line 65.

      Save the code and i think everything will be ok.

      Regards!

    • 6 years, 7 months ago eisalita
      Participant

      Looks good tho the menu part on the right side dont look right. See: https://traiteurninis.com/residential/

    • 6 years, 7 months ago eisalita
      Participant

      I can’t choose which one to go first on the food menu. I think this is a bug. Whatever I put first, it doesn’t go like that on the page. Please check.

    • 6 years, 7 months ago Ruco
      Keymaster

      Hello,

      To set the order of the menu items you have to use the Custom Post Order plugin. So you have order the menu item with drag and drop.

      Regards!

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