• Resolved pmontesinos

    (@pmontesinos)


    Hi,

    I can see that we can create edit the templates for menu section, title, price, etc.

    I see that menu-item.php echoes $this->print_elements( ‘body’ ) which I assume is the title, price, content, image. I can edit those individual template files, which is good.

    However, I’d like to wrap a div around the title and price only, so I can add a dotted border between those two things. Is there a way we can add wrapping divs? And, by extension, change the order in which each part of the menu item appears?

    https://wordpress.org/plugins/food-and-drink-menu/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi pmontesinos,

    Probably the easiest way to do this is just to open the div in the title template and close it in the price template.

    title.php:

    <div class="your-wrapper">
    	<p class="fdm-item-title"><?php echo $this->title; ?></p>

    price.php:

    <div class="fdm-item-price-wrapper">
    		<span class="fdm-item-price"><?php echo $this->price; ?></span>
    	</div>
    </div><!-- .your-wrapper -->
    Thread Starter pmontesinos

    (@pmontesinos)

    That’s right! Why didn’t I think of that! Thanks for the tip.

    No problem. If you get a chance, I always appreciate reviews of the plugin here.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Wrap div around title and price’ is closed to new replies.