Remove Hyperlinks From images (2 posts)

  1. amgillesp
    Posted 1 year ago #

    Im new to wordpress and i dont know html.
    Im trying to remove the hyper links from the images on this page.
    I have already done it for the page titles.

    Heres my code:
    /* Template Name: Menu */
    <?php get_header();


    <div class="mainside columns col3 fl">
    </div><!-- .mainside -->

    <div class="content columns col9 fr">

    <?php colabs_breadcrumbs(array('before'=>false, 'separator'=>'»'));?>
    <!-- .breadcrumbs -->
    $menucategories=get_terms( 'menu-category', 'order=asc' );
    foreach($menucategories as $menucategory){

    query_posts( array(
    'showposts' => -1,
    'post_type' => 'menu',
    'tax_query' => array(
    'taxonomy' => 'menu-category',
    'field' => 'id',
    'terms' => $menucategory->term_id

    <?php if ( have_posts() ):?>
    <div class="menu menu-list">
    <h2><?php echo $menucategory->name;?></h2>

      <?php while ( have_posts() ) : the_post();?>

    • <?php if(get_post_meta($post->ID, "is_special", true)=='true'){?>
      <div class="ribbon-special"></div>
      <?php }?>
      <?php colabs_image('width=170&height=120');?>
      <div class="menu-content">
      <h5><p href="<?php the_permalink();?>" title="<?php the_title();?>"><?php the_title();?></p></h5>
      <p class="menu-price"><?php echo get_post_meta($post->ID, "menu_price", true);?></p>
      <p class="menu-rate">
      <?php for($i=1; $i<=get_post_meta($post->ID, "menu_rate", true); $i++) : ?>
      <img src="<?php echo get_template_directory_uri();?>/images/star.png" alt="<?php echo $i;?> Star">
      <?php endfor; ?>
    • <?php endwhile;?>

    <?php endif;?>

    <?php }?>

    </div><!-- .content -->

    <?php get_sidebar('footer');?>

    <?php get_footer();?>

  2. missybunnie
    Posted 1 year ago #

    I can't see your page because there is a 500 error but a good way to remove a link from an image is when you add an image to the post from your media library go off to the side, down to the bottom of the column on the side and when it asks where to link to the image just go down the drop down menu and select none.

Topic Closed

This topic has been closed to new replies.

About this Topic