Register Advertise with usHelp Desk Today's Posts Search

Closed Thread
Thread Tools Search this Thread
Unread 2nd Nov 2011, 07:54 AM   #1
[Insert witty user title]
War Room Member
 
Ross Cohen's Avatar
 
Join Date: 2011
Location: Philadelphia, Pennsylvania
Posts: 962
Thanks: 123
Thanked 329 Times in 140 Posts
Blog Entries: 2
Default
Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

On my site VPS-Review.net ... see when you click the images? It brings up the image in a fancy display-like thing? I want it to direct to the post instead.

I believe this is the HTML:

<div class="preload_image">
<a class="single_image" href="<?php $links=wp_get_attachment_image_src( get_post_thumbnail_id($post->ID),full); echo $links[0]; ?>"><img src="<?php print_thumbnail_src('280','180') ?>" alt="single_review" /></a>
</div><!--end preload-->
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

What would I need to do to make it direct to the appropriate post instead of the image-thing?

Thank you!!
Ross Cohen is offline  
Unread 2nd Nov 2011, 07:57 AM   #2
HyperActive Warrior
War Room Member
 
ChristineCobb's Avatar
 
Join Date: 2009
Location: Houston
Posts: 174
Thanks: 10
Thanked 45 Times in 40 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Click on the image in your post/page editor and click the edit icon that appears on top of the image. You'll see a box that says "Link URL". Type the URL you want the image to link to in that box and save.

Creating an Affiliate Tools Page Couldn't Get Any Easier. Find out how.

Free Screencast Videos Resource Guide Here
ChristineCobb is offline  
Unread 2nd Nov 2011, 08:04 AM   #3
Director of Marketing
War Room Member
 
LukePeerFly's Avatar
 
Join Date: 2011
Location: PeerFly Office
Posts: 1,238
Thanks: 343
Thanked 523 Times in 340 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Try this:

HTML Code:
<div class="preload_image">
<a class="single_image" href="<?php the_permalink(); ?>"><img src="<?php print_thumbnail_src('280','180') ?>" alt="single_review" /></a>
</div><!--end preload-->
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

[SIGPIC][/SIGPIC]
^ My Blog

Are you an affiliate that runs PPV advertising? You need my PPV target scraper!
Have a Facebook Page? FPTraffic, manages over 1,000,000,000 (BILLION) Likes! Check it out :)
LukePeerFly is offline  
Unread 2nd Nov 2011, 08:23 AM   #4
[Insert witty user title]
War Room Member
 
Ross Cohen's Avatar
 
Join Date: 2011
Location: Philadelphia, Pennsylvania
Posts: 962
Thanks: 123
Thanked 329 Times in 140 Posts
Blog Entries: 2
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Luke, didn't quite have luck with that. It just made the popup bring up the entire post.

Chriscobb, think it's more of a backend sort of thing so every image leads to the post, not just the individual pic.
Ross Cohen is offline  
Unread 2nd Nov 2011, 08:59 AM   #5
Hybrid Entrepreneur
War Room Member
 
Join Date: 2010
Posts: 89
Thanks: 1
Thanked 6 Times in 4 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Try removing the class of "preload_image" or change it to another class.

JF Garsula is offline  
Unread 2nd Nov 2011, 09:06 AM   #6
[Insert witty user title]
War Room Member
 
Ross Cohen's Avatar
 
Join Date: 2011
Location: Philadelphia, Pennsylvania
Posts: 962
Thanks: 123
Thanked 329 Times in 140 Posts
Blog Entries: 2
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Would removing that alone make it go from bringing the pic up to making it go to the post though?
Ross Cohen is offline  
Unread 2nd Nov 2011, 09:11 AM   #7
Hybrid Entrepreneur
War Room Member
 
Join Date: 2010
Posts: 89
Thanks: 1
Thanked 6 Times in 4 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Sorry for not being clear. Try Luke's code and change/remove the class. You might have to add some CSS on the changed class. Just to make it look like the image before.

Code:
<!--Luke's Code-->
<div class="a_preload_image_before_class"> <!-- changed class--> 
<a class="single_image" href="<?php the_permalink(); ?>">
<img src="<?php print_thumbnail_src('280','180') ?>" alt="single_review" />
</a> 
</div><!--end preload--> 
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>

JF Garsula is offline  
Unread 2nd Nov 2011, 10:01 AM   #8
[Insert witty user title]
War Room Member
 
Ross Cohen's Avatar
 
Join Date: 2011
Location: Philadelphia, Pennsylvania
Posts: 962
Thanks: 123
Thanked 329 Times in 140 Posts
Blog Entries: 2
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

You're speaking a foreign language to me - haha.

Is there anything I can provide to make the answer more clear-cut... like copy/pasting some HTML from elsewhere for you?
Ross Cohen is offline  
Unread 2nd Nov 2011, 12:14 PM   #9
Director of Marketing
War Room Member
 
LukePeerFly's Avatar
 
Join Date: 2011
Location: PeerFly Office
Posts: 1,238
Thanks: 343
Thanked 523 Times in 340 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by resellcells View Post

You're speaking a foreign language to me - haha.

Is there anything I can provide to make the answer more clear-cut... like copy/pasting some HTML from elsewhere for you?
I would try to copy and paste what zaf101 posted.

[SIGPIC][/SIGPIC]
^ My Blog

Are you an affiliate that runs PPV advertising? You need my PPV target scraper!
Have a Facebook Page? FPTraffic, manages over 1,000,000,000 (BILLION) Likes! Check it out :)
LukePeerFly is offline  
Unread 2nd Nov 2011, 12:26 PM   #10
[Insert witty user title]
War Room Member
 
Ross Cohen's Avatar
 
Join Date: 2011
Location: Philadelphia, Pennsylvania
Posts: 962
Thanks: 123
Thanked 329 Times in 140 Posts
Blog Entries: 2
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

But in the space where it says <---changed class---> what would I place there?
Ross Cohen is offline  
Unread 2nd Nov 2011, 12:51 PM   #11
WordPress Expert
War Room Member
 
xtrapunch's Avatar
 
Join Date: 2011
Location: New Delhi, India
Posts: 1,097
Thanks: 29
Thanked 172 Times in 131 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Preloading images means the image is loaded even before it is requested by the user. It is a technique used often to load large images so that they are ready when user checks it out. It is not responsible for the pop-up windows. Some other code or plugin is responsible for this.


By the way, you are using a theme which isn't very good with SEO. Alt="single_review"??? Are you trying to rank for "single review"?

>> Web Design, Wordpress & SEO - XtraPunch.com <<
Web Design & SEO Agency | Serving World Wide from New Delhi, India

xtrapunch is offline  
Unread 2nd Nov 2011, 01:44 PM   #12
Active Warrior
War Room Member
 
Sean3000's Avatar
 
Join Date: 2010
Location: Denver, CO
Posts: 32
Thanks: 0
Thanked 4 Times in 3 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by chriscobb View Post

Click on the image in your post/page editor and click the edit icon that appears on top of the image. You'll see a box that says "Link URL". Type the URL you want the image to link to in that box and save.
This was my first thought too. Did you try this? I'm not familiar with this theme, but by default WordPress points new images to a dedicated attachment page and not the post. Try going back to your posts and change the link settings for the images to the "Link to Post" option before you start banging your head against the wall screwing around with code.
Sean3000 is offline  
Unread 2nd Nov 2011, 02:47 PM   #13
[Insert witty user title]
War Room Member
 
Ross Cohen's Avatar
 
Join Date: 2011
Location: Philadelphia, Pennsylvania
Posts: 962
Thanks: 123
Thanked 329 Times in 140 Posts
Blog Entries: 2
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Hm yeah I didn't do the single_review... that was like that. As for trying it manually, ah, I thought that would do it! Was excited, never saw that "post URL" button... but did it and nothing changed Very strange...
Ross Cohen is offline  
Unread 2nd Nov 2011, 08:01 PM   #14
Hybrid Entrepreneur
War Room Member
 
Join Date: 2010
Posts: 89
Thanks: 1
Thanked 6 Times in 4 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

@xtrapunch
Yeah you're right, I didn't find out when I checked out the site. The reason why I removed the class preload_image because, I usually use the preloaded images to load the fancybox/lightbox popup.

@resellcells

The <!--changed class--> is just a comment in HTML it won't do anything to the codes.
Copy and paste the code below:

Code:
<div class="preload_image"> 
<a href="<?php the_permalink(); ?>"> 
<img src="<?php print_thumbnail_src('280','180') ?>" alt="single_review" /> 
</a>  
</div><!--end preload-->  
<h2>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h2>
I just removed the class="single_image" because it loads the popup. You can check out the custom.js.

JF Garsula is offline  
Unread 2nd Nov 2011, 10:05 PM   #15
WordPress Expert
War Room Member
 
xtrapunch's Avatar
 
Join Date: 2011
Location: New Delhi, India
Posts: 1,097
Thanks: 29
Thanked 172 Times in 131 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by resellcells View Post

Hm yeah I didn't do the single_review... that was like that. Very strange...
I know the poor SEO image alt tags is due to the theme. Most of these Internet marketers offer themes that are bloated with codes and have poor SEO. I had created a website review theme a few months back for a client. That guy's original theme was very buggy and poorly coded.

>> Web Design, Wordpress & SEO - XtraPunch.com <<
Web Design & SEO Agency | Serving World Wide from New Delhi, India

xtrapunch is offline  
Unread 3rd Nov 2011, 05:29 AM   #16
Evan Mugford
War Room Member
 
Evan-M's Avatar
 
Join Date: 2010
Location: N.S. Canada
Posts: 414
Thanks: 22
Thanked 54 Times in 49 Posts
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Originally Posted by xtrapunch View Post

I know the poor SEO image alt tags is due to the theme. Most of these Internet marketers offer themes that are bloated with codes and have poor SEO. I had created a website review theme a few months back for a client. That guy's original theme was very buggy and poorly coded.
or wordpress added the alt tag like this_is_my_image.jpg would have a alt of this_is_my_image by default


try adding rel="nofollow" target="_parent"

sounds like you have fancy box plugin and its taking over the link

Evan-M

Easily The Worlds Best Wordpress Popup plugin

Visit Website Design Firm For All Your Wordpress Coding Needs
Evan-M is offline  
Unread 3rd Nov 2011, 09:21 AM   #17
[Insert witty user title]
War Room Member
 
Ross Cohen's Avatar
 
Join Date: 2011
Location: Philadelphia, Pennsylvania
Posts: 962
Thanks: 123
Thanked 329 Times in 140 Posts
Blog Entries: 2
Default
Re: Wordpress HTML Question
Share on: 
fb share twitter share gplus share more share

Zaf, perfect. Code works perfectly! Thanks so much everyone for helping!
Ross Cohen is offline  
Closed Thread


Bookmarks

Tags
html, question, wordpress


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT -6. The time now is 10:50 AM.