WordPress.org

Ready to get started?Download WordPress

Forums

anyone using Post Thumb Revisited ? (4 posts)

  1. ohblue
    Member
    Posted 5 years ago #

    how do i pull out an image without a link ?

  2. ohblue
    Member
    Posted 5 years ago #

    up up

  3. dreydesign
    Member
    Posted 5 years ago #

    bump bump :) same curiosity here! sometimes i need to have the thumb with no link, some other times i want to give a custom link for specific images...

  4. adanahmad
    Member
    Posted 5 years ago #

    Is it OK to Hard Coding it?

    Oke what I do is :

    Open:
    lib/post-thumb-classes.php

    Find:

    // Starts output using no javascript library
    		else {
    			if ($this->showpost || !$this->has_image)
    				$this->html = $this->n.'<a href="'.$this->post_url.'"';
    			elseif ($this->showlink)
    				$this->html = $this->n.'<a href="'.$this->default_link.'"';
    	                else
    				$this->html = $this->n.'<a href="'.$this->the_image.'"';
    
    	                $this->html .= ' title="'.htmlspecialchars($this->title).'"';
    			if ($this->myclasshref !='') $this->html .= ' class="'.$this->myclasshref.'"';
    			$this->html .= '>';
    
    			$this->html .= $this->nt.'<img src="'.$this->thumb_url.'" alt="'.htmlspecialchars($this->alt_text).'"';
    		        $this->html .= $this->myclassimg;
    		        $this->html .= $this->align;
    	                $this->html .= ' />'.$this->n.'</a>';

    Replace with:

    // Starts output using no javascript library
    		else {
    			if ($this->showpost || !$this->has_image)
    				$this->html = $this->n.'';
    			elseif ($this->showlink)
    				$this->html = $this->n.'<a href="'.$this->default_link.'"';
    	                else
    				$this->html = $this->n.'<a href="'.$this->the_image.'"';
    
    	                $this->html .= '';
    			if ($this->myclasshref !='') $this->html .= '';
    			$this->html .= '';
    
    			$this->html .= $this->nt.'<img src="'.$this->thumb_url.'" alt="'.htmlspecialchars($this->alt_text).'"';
    		        $this->html .= $this->myclassimg;
    		        $this->html .= $this->align;
    	                $this->html .= ' />'.$this->n.'';

    The thing I do is removing "<a href=" at the first statement, where it was using the "link=p" in my the_thumb() code.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.