How To: Get Featured Content Gallery to work in Thesis

by Greg Rickaby on May 27, 2009

Featured Content Gallery; everyone loves to have those big pretty images rotating on the homepage – but FCG just work out of the box with Thesis. There a work-around and I’ll explain it here.

featured-content-gallery

This is really rather easy. You can use Thesis OpenHook or Hard Code

Step 1: Download, install, and activate: Thesis OpenHook and Featured Content Gallery

Step 2: Paste this code in any Hook you’d like (and make sure to check “Execute PHP”):

<?php global $post; include(WP_CONTENT_DIR . '/plugins/featured-content-gallery/gallery.php'); ?>

fcg-thesis-screen-1

Step 3: Click “Little Ass Save Button”

Step 4: In your Dashboard go to “Settings” and “Featured Content Gallery” configure FCG similar to this:

fcg-thesis-screen-2

You may configure it anyway you’d like…this is merely and example, however with Thesis: YOU MUST SPECIFY POST ID, NOT CATEGORY!!!

Step 5: Click on “Posts” then “Add New”

Type out your post, then upload your images. Now you have to configure your “custom fields” like below:

fcg-thesis-screen-3

Finished: The finished product working in the “Header” Hook

fcg-thesis-screen-4


Hard Code Featured Content Gallery, using custom_functions.php

Step 1: Open “custom_functions.php” and copy this:

// *Featured Content Gallery */
function featured_content() {
global $post;
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}

add_action('thesis_hook_header', 'featured_content');

Step 2: Paste into custom_functions.php like below:

Hard Code FCG

Step 3: Save and upload

See wasn’t that easy? JUST FYI: Featured Content Gallery doesn’t play well with the Lightbox2 plug-in

UPDATE 8.15.09: Thesis 1.5.1, FCG 3.2.0, Thesis OpenHook 2.2, and WP 2.8.4 are playing well together.

Related posts:

  1. How To: Use WordPress Conditional Tags In Thesis
  2. How To: Create a Featured Content Slider
  3. How To: Add/Remove Thesis Elements using custom_functions.php
  4. Thesis Hooks = Module Positions
  5. Add an anchor to NextGEN Gallery Image Browser and increase your page-views by 100x

{ 77 comments… read them below or add one }

Brenda Nicholson August 21, 2010 at 20:40

I’ve spent far too many hours on trying to get the feature box to work and been to more websites than I can count. You made it simple and easy. Thank you.

Reply

sohbet June 27, 2010 at 11:48

This is really very nice tutorial. Now featured content gallery has more power with help of thesis. Thank you for your share.

Reply

Livio June 20, 2010 at 16:27

Hi Greg,

I’ve tried with both hard code and thesis open hook ways, but I’m only getting a blank display.
I can’t find where I’m doing it wrong.

Can it be the fact that I’m using it with wordpress 3.0 or thesis_hook_before_content instead of the header hook?

Take a look to see if you can help me: http://img691.imageshack.us/img691/9026/fcgproblem.jpg

Thanks for the tutorial!

Reply

Livio June 20, 2010 at 17:14

Turns out that the problem was only the fact that I had jquery running. I disabled it in the design options and it works just fine!

Thanks for the tutorial!

Reply

Sean Kaye April 18, 2010 at 06:56

I have the FCG working in my Thesis 1.7 theme on WP 2.9.2 so I’m pretty happy. One thing that I’d really like to figure out is:

Is it possible to put posts in the FCG, but then exclude them from the loop on the main page below the FCG?

So basically, a post appears in the FCG, it doesn’t appear in the list of posts below or vice versa, if a recent post isn’t in the FCG and is one of the X most recent posts, then it appears on my index page.

Any help would be appreciated.

Reply

LisaNewton April 2, 2010 at 14:11

I have tried and tried to get this to work and for some reason it’s not. Have you tried it in Thesis 1.7 yet?

I just don’t understand and an extremely frustrated. I know your great tutorial works, but I must be doing something wrong. I just can’t figure out what it is.

Reply

Sean Kaye April 18, 2010 at 06:27

I got it to work off the back of Greg’s excellent instructions on Thesis 1.7 and WP 2.9.2 so it does work. What’s happening and what are you seeing?

Reply

sheath dress March 30, 2010 at 07:06

Great idea. Thank for sharing.

Reply

DaveS March 21, 2010 at 12:01

I have tried everything, I am getting the image to load, but that is it, the text is not coming up at all and the gallery is not switching through photos. I have followed the instructions to a “T”.
See it here I can post screen shots if needed http://usedpontoonboats.net

Reply

mike February 6, 2010 at 14:01

have tried both openhook and hard code. Get a space when I set up hook_after_header but no content loads. Any ideas?

Thanks,
Mike

Reply

JonoL January 6, 2010 at 13:51

Very nice implementation Erica.
I am in the basic stages of fleshing out my layout.
@gregrickaby : Greg you said, “YOU MUST SPECIFY POST ID, NOT CATEGORY!!!” which makes sense. I have done so. But does this mean I have to constantly change what page/post IDs are displayed?
It doesn't seem like that much more work. If anything I think its far more flexible this way.

Secondly, how do I stop a post showin in FCG from showing just below the FCG?
stumbleholm.com

Reply

gregrickaby December 4, 2009 at 14:50

What's your login? I can try and fix it for you!

Reply

gregrickaby December 4, 2009 at 08:50

What's your login? I can try and fix it for you!

Reply

cctravis December 3, 2009 at 21:36

Mine is only showing a loading screen?

Anyone know how to get get past this loading screen?

I read every post on here and on the forum for the plugin.

Trying everything and can not get it off the loading screen.

http://clubsurfnicaragua.com/

Thanks
CC

Reply

gregrickaby November 27, 2009 at 11:47

Looks great! Good work.

Reply

ericablonde November 20, 2009 at 20:16

Great tutorial! I've implemented FCG on my mom's sewing blog http://couturesmith.com
Thank you!

Reply

gregrickaby November 13, 2009 at 10:25

Welcome!!

Reply

gregrickaby November 13, 2009 at 10:24

You're welcome!

Reply

gregrickaby November 13, 2009 at 10:24

I see you got it working, sorry I took this long to respond!

Reply

gregrickaby November 13, 2009 at 10:23
Nanette November 12, 2009 at 22:43

I want this only to show up on my home (front page). I am assuming that I can add “if_front_page” somewhere into the hard code….. anyone know how to do this?

Reply

Nanette November 12, 2009 at 22:42

I want this only to show up on my home (front page). I am assuming that I can add “if_front_page” somewhere into the hard code….. anyone know how to do this?

Reply

flavius andrei November 3, 2009 at 14:17

hi,

FYI: i've been working on a thesis theme (v 1.6) in which i had to add FCG. i just added FCG's php code to a hook but it didn't work (i had set FCG to use a category to display the gallery). then i set it the way you say here (to use post ids instead of category). didn't work either. then i switched back to category and… voila! it worked. but later i've discovered that the on every page (i set the gallery in the hook_before_content) under the FCG only archives were displayed. on EVERY page. somehow, FCG's loop was interfering with thesis'. so, i used wp_reset_query(); and fixed it all.

here's my before_content hook:

global $post;
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
wp_reset_query();

just thought about sharing this case someone else bumps into the same problem.

Reply

Jedi October 30, 2009 at 23:39

Yo man thanks ive been quizzin for days. This works!

Reply

Christopher McGill October 30, 2009 at 17:07

Thanks for all you have provided so far. For some reason my pics are not showing up. do you mind looking at them and let me know if you have any ideas? http://www.christophermcgill.com they are on the footer.

Reply

Tim October 19, 2009 at 05:33

Update on my installation – I was already using a heavily customised home page and the “thesis_hook_header” hook was already being used for a custom header – so both methods above were not working for me. I worked out all I needed to do was replace the <?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?> which is the code that comes with the gallery plugin, with your code: <?php global $post; include(WP_CONTENT_DIR . '/plugins/featured-content-gallery/gallery.php'); ?>
I just added this into the custom homepage code within the “custom_functions.php” file and it worked.
Thanks again.

Reply

Jill August 26, 2010 at 22:59

Using fixed it for me in Thesis 1.8. Thank you, thank you, thank you!!

Reply

Greg Rickaby August 27, 2010 at 15:18

Welcome, Welcome, Welcome!

Reply

Tim October 19, 2009 at 03:41

Yay – thanks Greg. Very nice work and well explained.
The fruit of my labour should be live on my home page in a couple of days hopefully.
I really like this gallery – I was using a Theme that featured it at one point, and that was my one regret at moving to Thesis at that stage. Now I have Thesis AND the cool gallery – Muuuuhaahahaha.
Thanks again

Reply

gregrickaby October 15, 2009 at 13:01

You're very welcome. I'm glad you got it working!

Reply

Jonas October 15, 2009 at 12:35

Hi Greg — it was the “use custom code” option in the design part of the dashboard (also realized that I had widgetized the mmbox a long time ago which may have done something, but I stripped it out since I don't really need that anymore)…

Thanks for the help and for the great tutorial!

Reply

gregrickaby October 14, 2009 at 22:53

did you try the default code I provided above?

// *Featured Content Gallery */
function featured_content() {
global $post;
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}

add_action('thesis_hook_header', 'featured_content');

If that works, then make sure you have the Multimedia Box set to “custom code”. If that is still a no-go, move it to the 'thesis_hook_after_multimedia_box'

Reply

Jonas October 14, 2009 at 22:44

nope – it's still crashing the customfunctions file (and my site) –

I just activated the plugin, slapped that code into the file and it's still a no-go…

Reply

gregrickaby October 14, 2009 at 22:41

You're missing an ' (apostrophe) in-front of http://blah blah

/*adding featured content gallery to the mmbox*/
function featured_content() {
global $post;
include ('http://www.dailypiscator.com/wp-content/plugins/featured-content-gallery/gallery.php');
}

add_action('thesis_hook_multimedia_box, 'featured_content');

Reply

Jonas October 14, 2009 at 22:35

Hi Greg — not sure why it crashed my customphp folder but it did. I put in the following, attempting to have it show up in my mmbox:

/*adding featured content gallery to the mmbox*/
function featured_content() {
global $post;
include (http://www.dailypiscator.com/wp-content/plugins...
}

add_action('thesis_hook_multimedia_box, 'featured_content');

Any ideas?

Reply

Ricardogrant September 25, 2009 at 20:51

hey have a look a my blog please
the bar just stays there all the time and the images do not lad but the text does
please help me
i dunno what else to do
please email me if you have a solution
i have used this plugin on many other websites just dunno what the problem is here

Reply

Ricardogrant September 25, 2009 at 19:51

hey have a look a my blog please
the bar just stays there all the time and the images do not lad but the text does
please help me
i dunno what else to do
please email me if you have a solution
i have used this plugin on many other websites just dunno what the problem is here

Reply

MommyGeek September 24, 2009 at 20:50

Oh good lord nevermind. I JUST figured out what I did wrong.

DOH!

Reply

MommyGeek September 24, 2009 at 20:42

hey Gary! I see that you have it working, site looks great! I actually had trouble implementing this one — did you run into any snags? Mine kept sticking on the “loading” part — it'll show my featured posts if I manually scroll, BUT the loading image graphic stays. Any ideas?

Reply

gregrickaby September 18, 2009 at 08:00

Yes you could use conditional tags.

http://gregrickaby.com/use-conditional-tags-in-...

Reply

gregrickaby September 18, 2009 at 07:59

I'm glad my fix works on Headway too! :)

Reply

gregrickaby September 18, 2009 at 07:59

Yes, you should probably use the MMbox hook instead.

// *Featured Content Gallery */
function featured_content() {
global $post;
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}

add_action('thesis_hook_multimedia_box, 'featured_content');

Reply

pieprincess September 17, 2009 at 20:12

Can you help get a video in the multi-media box – I've got the embedded code in the MM box – not showing up. Do I need a hook?
site is http://socialmediamastermindlive.com

Reply

gary d. goodwin September 15, 2009 at 18:03

Thank you for this bit of code! I was getting pretty frustrated with FCG and their forum. There just were no answers there. But I'm using a new theme called Headway and the code worked perfectly. Thank you. Check my website:
http://tmgnow.com/TMG1
it's still in the construction stage!

Reply

Cat_3KidsandUs September 8, 2009 at 23:54

Thank you so much, after must frustration trying on my own I found your tutorial and it worked like a charm…with one itty bitty exception. I placed the box before_content and it looks fabulous but is there a way to exclude it from showing up on other pages of the theme? It loads on my pages, individual posts, etc. I'd like it to only show on the homepage.

Any thoughts you could offer would be greatly appreciated.

Reply

Cat_3KidsandUs September 8, 2009 at 22:54

Thank you so much, after must frustration trying on my own I found your tutorial and it worked like a charm…with one itty bitty exception. I placed the box before_content and it looks fabulous but is there a way to exclude it from showing up on other pages of the theme? It loads on my pages, individual posts, etc. I'd like it to only show on the homepage.

Any thoughts you could offer would be greatly appreciated.

Reply

gregrickaby September 5, 2009 at 08:13

Then you sir are an exception. Do you have a link to your website? I might be able to help?

Reply

David Markland August 31, 2009 at 18:28

Nope, even with this the plugin isn't appearing. When I use the “hard code” option it not only doesn't appear, but says I don't have any posts in the database. I'm trying to have this appear in the multimedia box, or just below it. Also finding that other gallery plug ins aren't working with the newest version of Thesis.

Reply

Kwame August 29, 2009 at 14:43

You sir, are an absolute legend. That bit of code worked a treat. GENIUS. Many thanks!

Reply

Kelsey July 27, 2009 at 18:42

Hello, thanks for the post, very helpful! I used the openhook plugin and inserted the code into the “After Post Box” section. It works perfectly and shows up where I want it to, however, it seems to be left aligning in the column, and I would like to center the FCG. Is there a simple code I could plug into the custom.css file? Thanks again!

Reply

Greg Rickaby July 27, 2009 at 20:19
Greg Rickaby July 16, 2009 at 14:59

UPDATE 7.15.09: FCG 3.2.0, Thesis OpenHook 2.2, and WP 2.8.2 are all working together correctly! Use the tutorial above and you will have success!

Reply

Jason July 15, 2009 at 22:46

Amen man. Greg, thank you, thank you so much for this brilliant tutorial. Its an interesting mix, FCB + Thesis, and I really appreciate the time and effort that went into this straight-forward tutorial.

I have the exact same problem as One3rdNerd above, using latest Thesis + WP (2.8.1) – I’d LOVE any tips on this, you seem super-knowledgable about it.

Either way, it’s a pleasure man. Take care.

Reply

One3rdNerd July 11, 2009 at 22:53

Hi, im trying to set this up on a site im working on locally. Have their been any developments with getting this to work with the latest wordpress and thesis?

I have the box appearing, and im 95% sure I have no syntax issues etc, yet the box is not filled with the content it should be.

Thanks

Reply

Shelby July 6, 2009 at 10:41

Anything new to report about WordPress 2.8 and Featured Content Gallery? I’ve been unable to get it to work no matter how many tutorials or support posts I follow.

Reply

KazClark July 1, 2009 at 15:30

Great post, thanks!
I am struggling though and think it may because I am renaming the box?!
This is my code:

// *Featured Content Gallery */
function featured_content_gallery() {
if (is_page(‘home’))
{
global $post;
include (ABSPATH . ‘/wp-content/plugins/featured-content-gallery/gallery.php’);
}}
add_action(‘thesis_hook_before-content’, ‘featured_content_gallery’);

It’s not coming up. I followed steps for two images and popped them in as described above.

If you have time I have a few questions:
1. If I add an image to article img does it have to be one in the post already or is it ok to reference a new, larger image that corresponds with size of a larger FCB? My post images tend to be 458, but ideally I’d have a FCB of 959.
2. If I add a FCB is it possible to do so only on one page?
3. What I really wanted to do was have an image box (using FCB) that would basically rotate 4 -6 images (not necessarily posts); but mix it up with featured content too. I’ve had a play but is it actually possible to just create a post, add an image using the articleimg reference, and a line of text. I would give these images a new category (FCB) that I would then exclude from my blog and other places using the ACE plug in.
Am I trying too much of a work around or in your experience could I achieve something like this. The nearest I have seen to it is The Pioneer Woman home page box.
Thanks ever so much for any pointers. I’ve to the plug-in via some crazy hours spent trying to create a 2nd feature box that I could call images into.
Appreciate any support.

Reply

Emily June 20, 2009 at 15:15

Wondering if there is an issue with WP 2.8 also. No matter if I put the code in OpenHook or in custom_functions, it breaks all links on my site. Tags, categories and pages all cease to work.

Reply

Greg Rickaby June 22, 2009 at 12:04

Emily,

I’m using the ‘hard-coded’ version on http://www.heatherruesch.com. That site is running WP 2.8 and Thesis 1.5.1. It is functioning fine.

I’m digging deeper into the OpenHook issue. I’ll be in contact with KingdomGeek.

Reply

Nathan W. Bingham June 13, 2009 at 03:11

Thanks for this tutorial.

Has anyone had Featured Content Gallery working with Thesis after upgrading to WP2.8? I’ve just spent the last 2 hours installing, and tweaking the CSS etc. Now I’ve realised that if I activate the Feature Box on all pages, and put the gallery in the Featured Box, none of my single posts display (it gives the ‘nothing found here’ error). Furthermore, on the front page is refuses to display my last several posts, ie., the first post displayed in the loop is a post from several days ago.

I found there appears to be some issues for others as well in this thread but they don’t appear to be looking into it.

Thanks again. I’ve de-activated the Featured Box until I can get it working properly.

Reply

Nathan W. Bingham June 15, 2009 at 18:47

Well I couldn’t wait for a reply, so I found another plugin: Dynamic Content Gallery. It is working wonderfully. If you use the Thesis theme, there is a slight change of code you need, but that’s it.

Reply

gabe mott June 9, 2009 at 15:25

greg-
thanks so much for your video on openhooks. getting me going there, i appreciate it. now reading your fcg stuff… i’m reluctant to even get into it because i don’t like their little tag line “featured content” that appears on every slide…. just my 2 cents. thanks again for your blog.

Reply

FatBanker June 7, 2009 at 13:19

Hmmmm, I’ve tried it both ways now and still no joy. Have a look down the bottom of my site where the FCG spins and and spins forlornly…

any idea/help would be greatly appreciated (I’ve disabled all plugins and still no luck!)

Reply

Greg Rickaby June 10, 2009 at 13:50

What is the link to your website? The one you provided doesn’t work.

Reply

FatBanker June 5, 2009 at 10:39

Thanks Greg for the informative post. It’s Friday, so I will use your Open Hook method to make my weekly effort at getting Featured Content Gallery to work (without just displaying a bloack box) on my blog (www.appetiteindulgence.com). I have a very silly related question – is there anywhere in thesis that I can see the Post Id that is attached to a particular post? Maybe I’m just looking in the wrong place….??
Thanks
FB

Reply

Greg Rickaby June 10, 2009 at 13:51

The answer is very simple. Just go to your Wordpress dashboard. Then go to “posts”. By clicking posts, you will be directed to the list of your posts (Edit Post) which are ready to be edited. To determine the ID number of your post, just hover your mouse on the post from the list. And presto! You can now see the post ID number of your post at the bottom of your window. See example URL below:

http://yourdomain.com/wp-admin/post.php?action=edit&post=10

The post ID is “10”.

=)

Reply

Fausto Ponce June 4, 2009 at 11:40

Hi, Greg! Do you know a way to make a feature gallery in the multimedia box?

Reply

Greg Rickaby June 10, 2009 at 13:52

I do not. The MMB is a tricky place that I just leave alone.

Reply

Chris Baskind June 3, 2009 at 18:03

Greg, thanks. That works well. I used the OpenHooks method.

One question, if there’s a quick answer: I really only want FCG to display on the home page. I’m guessing there must be some sort of conditional statement that might work, but I’ve not been successful so far.

Reply

Greg Rickaby June 3, 2009 at 22:56

I get asked this question so much I decided to write a blog post about it!!! This will answer all your questions: http://tinyurl.com/qzrw5x

Reply

Ray June 3, 2009 at 17:46

I placed the code into openhook (feature box) the space is there but its a black box trying to load nothing comes up any ideas?

Reply

Greg Rickaby June 3, 2009 at 23:00

It could be a number of things.

1. Double check your config
2. Make sure you’re not using the “Lightbox 2″ plug-in
3. Try disabling all other plug-ins one-by-one
4. When in doubt, hit up the FCG forum http://tinyurl.com/o5fv9o (it’s certainly helped me)

Reply

Allison May 30, 2009 at 11:02

Hi, Thanks for this help. Ive got my FCG on my home page. Would you mind telling me how to adjust the placement of it in Thesis. It hugs the nav bar at the top and it is left justified. I want to move it down a bit and center it above my center content column. Thank you!

Reply

Greg Rickaby May 31, 2009 at 16:13

Are you placing it using OpenHook or with custom_functions.php. Also do you have a link to your site?

Reply

Jennifer Wilson - Agent Solutions June 4, 2009 at 23:47

I am having the same trouble as Allison was. It is not centered and hugs my right sidebar. I want it to be the full width of my content area.

I have used the custom_functions.php for the code.

Any help or direction would be greatly appreciated.

Thanks!

Reply

Allison May 29, 2009 at 20:31

This looks great. Im going to try it shortly. But first, are your social media icons below your post a plugin? Or did you design that from scratch. Really like that. Thanks.

Reply

Greg Rickaby May 31, 2009 at 16:12
Rhea@mommy23monkeysr May 27, 2009 at 22:27

Cool. I’ve wanted to put the FCG back into my blog but it made my head hurt to do it. I’ll try doing this in the morning. :) Thanks!

Reply

Leave a Comment

{ 2 trackbacks }

Previous post:

Next post: