Genius is nothing but great effort applied. – Awa Kenzo

How To: Get Featured Content Gallery To Work In Thesis

Everyone loves to have those big pretty images rotating on the homepage – but FCG doesn’t work out of the box with Thesis. We’ll fix it using either the Thesis OpenHook plug-in or hard coding into custom_functions.php

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 into custom_functions.php

Step 1: Open custom_functions.php and paste 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: Save and upload.

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

Greg Rickaby runs on the Genesis Framework

Genesis Framework

The theme you're viewing is the eleven40 Child Theme, which was built on Genesis.

Genesis empowers you to quickly and easily build incredible websites with WordPress. Whether you're a novice or advanced developer, Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go. It's that simple - start using Genesis now!

Take advantage of the 6 default layout options, comprehensive SEO settings, rock-solid security, flexible theme options, cool custom widgets, custom design hooks, and a huge selection of child themes ("skins") that make your site look the way you want it to. With automatic theme updates and world-class support included, Genesis is the smart choice for your WordPress website or blog.

Comments

  1. Hi Greg I am having trouble getting pictures to load in the player. I uploasd them to the post but they keep ending up with wording. can you help. I think the problem is with my config not sure how to do it.

  2. Hi I cant get the pictures to go into the box they stay outside the box and go into the post I think it is the config part that I am messing up on I can’t seem to figure out how toconfig the custom fields please help

  3. oops I found it thanks

  4. Hi I can not seem to find the customs fields area on my dashboard dang!

  5. niraj says:

    How to display FCG in front page only?
    my FCG is working fine using ur idea but shows up every where so i really appreciate if you give me hints to make it display only in front page (home page).

    Thank you,

  6. 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.

  7. sohbet says:

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

  8. Livio says:

    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!

    • Livio says:

      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!

  9. Sean Kaye says:

    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.

  10. LisaNewton says:

    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.

    • Sean Kaye says:

      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?

  11. Great idea. Thank for sharing.

  12. DaveS says:

    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

  13. mike says:

    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

  14. JonoL says:

    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

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

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

  17. cctravis says:

    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

  18. Looks great! Good work.

  19. ericablonde says:

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

  20. Welcome!!

  21. You're welcome!

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

  23. Nanette says:

    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?

  24. Nanette says:

    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?

  25. 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.

  26. Jedi says:

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

  27. 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.

  28. Tim says:

    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.

  29. Tim says:

    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

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

  31. Jonas says:

    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!

  32. 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'

  33. Jonas says:

    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…

  34. 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&#39;);
    }

    add_action('thesis_hook_multimedia_box, 'featured_content');

  35. Jonas says:

    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?

  36. 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

  37. 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

  38. MommyGeek says:

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

    DOH!

  39. MommyGeek says:

    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?

  40. Yes you could use conditional tags.

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

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

  42. 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');

  43. pieprincess says:

    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

  44. 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!

  45. Cat_3KidsandUs says:

    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.

  46. Cat_3KidsandUs says:

    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.

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

  48. 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.

  49. Kwame says:

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

  50. Kelsey says:

    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!

  51. Greg Rickaby says:

    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!

  52. Jason says:

    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.

  53. One3rdNerd says:

    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

  54. Shelby says:

    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.

  55. KazClark says:

    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.

  56. Emily says:

    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.

  57. 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.

  58. gabe mott says:

    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.

  59. FatBanker says:

    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!)

  60. FatBanker says:

    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

    • 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”.

      =)

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

  62. 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.

  63. Ray says:

    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?

  64. Allison says:

    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!

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

      • Jennifer Wilson - Agent Solutions says:

        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!

  65. Allison says:

    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.

  66. 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!

Trackbacks

  1. [...] Thesis with WordPress and phpBB3 Integrate Featured Content Gallery with Thesis Author: Greg Rickaby Site: [...]

  2. [...] Get Featured Content Gallery to work in Thesis (tags: thesis thesiswp wordpress featured content gallery FCG howto tutorial) [...]

Speak Your Mind

*