Featured Content Gallery | WordPress Plugin | iePlexus

Is that possible to link FCG Image to my preferred URL?

Customizing the FCG plugin and more

Is that possible to link FCG Image to my preferred URL?

PostBy WyffGoaL on Thu Mar 12, 2009 4:25 am

As title,

I would like to link my FCG Images to my preferred URL. For instance, when a person clicks on the FCG Images, it will go to the particular URL I set instead of going to the exact post/page.

In fact, I want my visitors to be redirected to the preferred URL.

Is this possible to make it working?

Hopefully someone can shed me some green light.


Thanks in advance.
WyffGoaL
 
Posts: 3
Joined: Thu Mar 12, 2009 4:17 am

Re: Is that possible to link FCG Image to my preferred URL?

Thank you for using the Featured Content Gallery Forum
 

Re: Is that possible to link FCG Image to my preferred URL?

PostBy admin on Thu Mar 12, 2009 8:05 am

The main idea of this plugin to show featured posts/pages of site on main page.
Anyway it can be done...
Yelena Khamidullina
Web Applications Developer, iePlexus

1. Check settings to exclude fcg-YOU conflict
2. Try to turn off all your plugins at once to exclude fcg-other plugin conflict
3. Try default theme to exclude fcg-theme conflict
4. Post in this forum to involve me in your troubleshooting. URL is required
User avatar
admin
Site Admin
 
Posts: 4738
Joined: Fri Jan 16, 2009 9:29 am
Location: Seattle, WA

Re: Is that possible to link FCG Image to my preferred URL?

PostBy WyffGoaL on Thu Mar 12, 2009 12:43 pm

How should I get it done if it is possible, hope you could help.

Anyway, thanks for your reply.
WyffGoaL
 
Posts: 3
Joined: Thu Mar 12, 2009 4:17 am

Re: Is that possible to link FCG Image to my preferred URL?

PostBy isotropy on Thu Mar 12, 2009 5:27 pm

I would also love to know if this is possible. What I would like to do is be able to configure it to lauch a quicktime movie in a separate window. I'm currently using some code to do that on my standard posts, but being able to do this through FCG would be awesome.

Thanks!
isotropy
 
Posts: 4
Joined: Mon Mar 09, 2009 9:05 pm

Re: Is that possible to link FCG Image to my preferred URL?

PostBy sixthsiren on Tue May 05, 2009 7:48 am

I figured this out...

Go to your plugin folder for the Featured Content Gallery and open the file gallery.php in a text editor.

Look for this line of code (it's towards the bottom):
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>

Replace it with this:
<a href="<?php $key="articleurl"; echo get_post_meta($post->ID, $key, true); ?>" title="Read More" class="open"></a>

Save that file and now go to your Featured post. Now under the Custom Fields section add a new field and name it: "articleurl". No quotes, and this is case sensitive.

Now for value enter in the URL you want to point to and hit Update and your done. Make sure to make the link contain the http://
sixthsiren
 
Posts: 2
Joined: Tue May 05, 2009 7:39 am

Re: Is that possible to link FCG Image to my preferred URL?

PostBy jcross on Fri Jun 19, 2009 11:03 am

I had a client who wanted this control as well. We solved it this way:

Go to the plugins section of your WP install, and open gallery.php under featured-content-gallery folder.

Look around line 44 and replace the a href just above 2 img tags with this:
Code: Select all
<a href="<?php $key="articlelinkto"; echo get_post_meta($post->ID, $key, true); ?>" title="Go to page" class="open"></a>


Do the same around line 69, using the same code above.

What this does is add a new custom field called "articlelinkto" that you can play with. To make use of this, add the custom field "articlelinkto" (no quotes). Use the other box to put a link to wherever you want. Now, when a user clicks the image itself in the gallery, it will jump to this link.

Let me know if I've explained this well enough.

note* updating FCG will remove this feature, and it will have to be redone.
jcross
 
Posts: 2
Joined: Fri Jun 19, 2009 10:39 am

Re: Is that possible to link FCG Image to my preferred URL?

PostBy WPLJ on Wed Jul 01, 2009 9:18 am

The last two posts are the same identical solution, it's just that the name that each person chose to give to the custom field and title is different.

Just wanted to add this clarification.
WPLJ
 
Posts: 3
Joined: Thu Jun 11, 2009 1:43 pm

Re: Is that possible to link FCG Image to my preferred URL?

PostBy Aspire on Mon Jul 20, 2009 5:31 pm

Ive read both great responses above, but i thought i would improve on them to make it more user friendly.

Ok, so what if you dont want to make all the "feature" posts to have a 'special' URL? What if you only want certain posts to have a 'special' URL? (or if you forget to specify a custom link)

Well you replace this code:

Code: Select all
<a href="<?php the_permalink() ?>" title="Read More" class="open"></a>


With...

Code: Select all
<a href="<?php
$link = get_post_meta($post->ID, "link", $single = true);
if ( $link ) { echo $link; }
else { the_permalink(); } ?>" title="Read More" class="open"></a>


To specify the link (URL) - add the custom field link with the full URL to the website.

Please note: You will need to do this in two places. The first is located at line 44 and the second one is around line 69.

What the code asks is:

Get Link > If link is found, post link > If NOT found, post link to post.

Please remember to backup the gallery.php file before editing it.

Great plugin this is. One of the best gallery plugin ive come across.
Aspire
 
Posts: 1
Joined: Mon Jul 20, 2009 5:18 pm

Re: Is that possible to link FCG Image to my preferred URL?

PostBy Luffer on Mon Sep 07, 2009 4:50 am

I don't understand how to use this, can someone explain to me how I'd use this method to have a single FCG item link to a tag while other items link as normal?

I want the first item on the gallery to go to a tag called "ETC" which will link to that tags page and show all articles with the "ETC" tag. Then the other items in the gallery will go to Page IDs as normal.

Thanks in advance.
Luffer
 
Posts: 13
Joined: Thu Apr 02, 2009 3:59 pm

Re: Is that possible to link FCG Image to my preferred URL?

PostBy drazek on Wed Sep 23, 2009 7:40 pm

all these solutions open in the same page

is it possible to now open that link in the new page?

usually done with _target="blank" in href, but i can't seem to make it work
drazek
 
Posts: 1
Joined: Wed Sep 23, 2009 7:38 pm

Next

Return to Plugin Settings, Features, and Options

Who is online

Users browsing this forum: No registered users and 0 guests