Link the Result Image

Forums › Forums › Search & Filter Pro › Link the Result Image

Viewing 10 posts – 1 through 10 (of 10 total)
  • Anonymous
    #46172

    Hey Team,

    How can i link the Image of each result,in result page, to the attached post (Post = Download via Download Manager for WordPress).

    http://www.versicherungsbedingungen-online.de/suchseite

    Greats

    Trevor
    #46181

    You appear to be using the shortcode results method, so that is good. Did you make a copy of results.php and place it in a folder called search-filter in your theme folder?

    If so, find this code block:

    <?php
      if ( has_post_thumbnail() ) {
        echo '<p>';
        the_post_thumbnail("small");
        echo '</p>';
      }
    ?>

    and make it this (I think):

    <?php
      if ( has_post_thumbnail() ) {
        echo '<a href="' . the_permalink() . '">';
        the_post_thumbnail("small");
        echo '</a>';
      }
    ?>
    Anonymous
    #46183

    Thanks for responce!

    I did created a folder in my chilt theme folder via FTP and copyed the result.php to that place.
    I also edit the code, but till now, it is not working.

    Greats

    Anonymous
    #46184

    ahhh.. forget t overwrite the old file.
    Now the link is working, but the URL is visible aove the picture.
    How to hide the url?

    Trevor
    #46190

    It might need to be this:

    <?php
      if ( has_post_thumbnail() ) {
        echo '<a href="';
        the_permalink();
        echo '">';
        the_post_thumbnail("small");
        echo '</a>';
      }
    ?>
    Anonymous
    #46193

    works perfect!
    Thanks allot!

    I have one last question and also the last problem befor going live.

    I wan´t to display the taxonomies into my single download page (Post-page).
    I know that this is not you area of support, but maybe you could help me with one thing, because i need the right S&F PHP Information to set up the code, so i can input everything into my download template.

    The support team of Download Manager send me this code:
    http://www.wpdownloadmanager.com/doc/filter-reference/wdm_before_fetch_template/

    <?php
    add_filter('wdm_before_fetch_template','my_fetch_template',10,1);
    function my_fetch_template($vars){
    //your code here
    $vars['tag-name'] = "tag value";
    $vars['new_tag'] = callback_function();
    return $vars;
    }
    ?>

    After including this code with the right paramteres, i should be able to use [tag-name] in my template editor (From WPDM) for the single download layout.

    One Taxonomie for example is called “versicherer” and its assigned to the Post Type ” wpmdpro”.

    Can you help me with that?

    Greats

    Trevor
    #46195

    I am afraid not 🙁

    Anonymous
    #46196

    Ok, no Problem!
    Thanks anyway and have a nice weekend!

    BZW: GREAT SUPPORT!!!

    Trevor
    #46197

    Can I close this thread and mark it resolved?

    Anonymous
    #46198

    Yes!

Viewing 10 posts – 1 through 10 (of 10 total)
Search & Filter Support
Privacy Overview

This website uses cookies so that we can provide you with the best user experience possible. Cookie information is stored in your browser and performs functions such as recognising you when you return to our website and helping our team to understand which sections of the website you find most interesting and useful.

We also use cookies to store items in your cart as well as allowing your to login on the site.

You can adjust all of your cookie settings by navigating the tabs on the left hand side.

By continuing to use this site, you also agree to our Privacy Policy.