WordPress.org

Ready to get started?Download WordPress

Forums

Restaurateur
Open dish page (4 posts)

  1. will7914
    Member
    Posted 5 months ago #

    Hello,

    Is there a way to click on each dish to open its own page ?

    Thanks !

  2. soxpm
    Member
    Posted 4 months ago #

    Hi Will,
    For each dish there is a 'permalink' page. Edit the menu item and look for the link toward the top of the page. It should say something like http://yourdomain.com/menu-item-archive/dishname. There is a button below the link that lets you create a short link as well. This is a numeric version of the link. It will be displayed when you hit the short link button.

  3. soxpm
    Member
    Posted 4 months ago #

    I am working on a way to make it so you can click on the name of the dish and take you to that page by editing the content-menu.php page. I'll let you know what I find.

  4. soxpm
    Member
    Posted 4 months ago #

    Edit content-menu.php
    To make the image link to the dish page, replace

    <div class="imgthumb"><?php the_post_thumbnail( array(300, 300) ); ?></div>

    with
    <div class="imgthumb"><a href="<?php _e(get_permalink($post->ID)); ?>"><?php the_post_thumbnail( array(300, 300) ); ?></a></div>

    To make the dish title link to the individual page, replace

    <h2 class="entry-title"><?php the_title(); ?></h2>

    with

    <a href="<?php _e(get_permalink($post->ID)); ?>"> <h2 class="entry-title"><?php the_title(); ?></h2></a>

    Please note that I modified the thumbnail zoom in my code by changing array(600, 300) to array(300, 300).

Reply

You must log in to post.

About this Theme

About this Topic

Tags

No tags yet.