WordPress.org

Ready to get started?Download WordPress

Forums

Remove Hyperlinks From images (2 posts)

  1. amgillesp
    Member
    Posted 7 months ago #

    Hi
    Im new to wordpress and i dont know html.
    Im trying to remove the hyper links from the images on this page.
    http://cottagetandoorirainford.com/?page_id=171
    I have already done it for the page titles.

    Heres my code:
    <?php
    /* 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 -->
    <?php
    wp_reset_query();
    $menucategories=get_terms( 'menu-category', 'order=asc' );
    foreach($menucategories as $menucategory){

    query_posts( array(
    'showposts' => -1,
    'post_type' => 'menu',
    'tax_query' => array(
    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; ?>
      </p>
      </div>
    • <?php endwhile;?>

    </div>
    <?php endif;?>

    <?php }?>

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

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

    <?php get_footer();?>

  2. missybunnie
    Member
    Posted 7 months 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.

Reply

You must log in to post.

About this Topic