Title: Need Help Placing A Code Please!
Last modified: August 20, 2016

---

# Need Help Placing A Code Please!

 *  [youngr](https://wordpress.org/support/users/youngr/)
 * (@youngr)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/)
 * Hi, I’m trying to use the plugin featured content gallery but do not know where
   to add the code to display the gallery above all posts?
 * Any ideas? thanks!

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/need-help-placing-a-code-please/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/need-help-placing-a-code-please/page/2/?output_format=md)

 *  Moderator [Ipstenu (Mika Epstein)](https://wordpress.org/support/users/ipstenu/)
 * (@ipstenu)
 * 🏳️‍🌈 Advisor and Activist
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613471)
 * Sorry about that, deleted all the spam.
 * Can you link to the plugin? The one named content-gallery ([http://wordpress.org/extend/plugins/content-gallery/](http://wordpress.org/extend/plugins/content-gallery/))
   doesn’t exist.
 *  [Lindy Norris](https://wordpress.org/support/users/lindynorris/)
 * (@lindynorris)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613491)
 * I believe they are referring to the plug-in: [http://wordpress.org/extend/plugins/featured-content-gallery/](http://wordpress.org/extend/plugins/featured-content-gallery/)
   The installation instructions can be found at: [http://www.featuredcontentgallery.com/install-setup/](http://www.featuredcontentgallery.com/install-setup/)
 * If you are wanting to add the gallery above all posts then you’d probably want
   to do this in single.php. Depending on your layout you might possibly do this
   in header.php.
 *  [Altaf Hussain Patel](https://wordpress.org/support/users/altafhpatel/)
 * (@altafhpatel)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613493)
 * [@lindy](https://wordpress.org/support/users/lindy/) norris … he says that he
   want to add above posts to you have to add the code to the single.php
 * kindly share the code of single.php so me can try my best to help…
 *  Thread Starter [youngr](https://wordpress.org/support/users/youngr/)
 * (@youngr)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613564)
 * Hi guys, thanks for all the advice. I can confirm that it is called Featured 
   Content Gallery: [http://wordpress.org/extend/plugins/featured-content-gallery/](http://wordpress.org/extend/plugins/featured-content-gallery/)
 * The problem is the setup does not specifically tell me where I can place it. 
   I would love to have it above all new posts on the front page e.g. very similar
   to a sticky?
 * My single.php:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome#Posting_Code).
   The maximum number of lines of code that you can post in these forums is **ten
   lines**. Please use the [pastebin](http://wordpress.pastebin.com/)]_
 *  [Nihad Nagi](https://wordpress.org/support/users/nihadnagi/)
 * (@nihadnagi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613569)
 * **For adding the Gallery itself:**
    Place this code in your theme files, where
   you want it to appear. In your case, add the following code at your home-page
   template.php
 * <?php include (ABSPATH . ‘/wp-content/plugins/featured-content-gallery/gallery.
   php’); ?>
 * **For placing content inside the gallery:**
    If you’re just using the default
   settings, you just need to use the **articleimg** custom field. Simply add this
   custom field to each post or page you’re featuring, and add the full URL to the
   image you’d like to display in the value. If adding custom thumbnails, custom
   text, or alt tags you need to add the thumbnailimg , featuredtext or alttext 
   custom fields.
 * If you need more help regarding custom fields, feel free
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613571)
 * No – don’t use ABSPATH. That is a reserved **internal** variable. Use [plugin_dir_path()](http://codex.wordpress.org/Function_Reference/plugin_dir_path).
 *  Thread Starter [youngr](https://wordpress.org/support/users/youngr/)
 * (@youngr)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613583)
 * [@nihad](https://wordpress.org/support/users/nihad/) I tried adding the code 
   but nothing shows up? Any advice?
 *  [Nihad Nagi](https://wordpress.org/support/users/nihadnagi/)
 * (@nihadnagi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613584)
 * You mean the whole gallery or featured content that doesn’t show up?
 *  [Nihad Nagi](https://wordpress.org/support/users/nihadnagi/)
 * (@nihadnagi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613591)
 * **If the gallery is not showing then:**
    Then it was pasted in the wrong place.
   Do the following as a quick test. Place the PHP code for the gallery inside template“
   header.php”, you can leave it there, if you want the gallery to be available,
   the same way as your logo for all content. Just test it. If you need it, in any
   other place, tell me how and I will tell you where.
 * **If the Featured items are not showing:**
    Then custom fields are not set properly,
   advice,and will guide you through.
 *  Thread Starter [youngr](https://wordpress.org/support/users/youngr/)
 * (@youngr)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613654)
 * I’ve just placed the code into the header.php and nothing is coming up for some
   reason?
 *  [Nihad Nagi](https://wordpress.org/support/users/nihadnagi/)
 * (@nihadnagi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613679)
 * Switch to another template, and try doing the same thing. JS conflicts is a possible
   reason.
    Let me know.
 *  [Nihad Nagi](https://wordpress.org/support/users/nihadnagi/)
 * (@nihadnagi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613680)
 * Additionally, before further troubleshooting, watch this instructional video,
   and make sure you complied with all the steps.
 * [Featured Content Gallery – Instructional Video – iePlexus](http://vimeo.com/3299013)
 * Let me know, how it went.
 * Regards.
 *  Thread Starter [youngr](https://wordpress.org/support/users/youngr/)
 * (@youngr)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613685)
 * Sorry, I know I’m probably going to be a nuisance but switching templates will
   ruin my blogs look. Is there no other way?
 * Or maybe I could get a different plugin?
 *  [Nihad Nagi](https://wordpress.org/support/users/nihadnagi/)
 * (@nihadnagi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613693)
 * Don’t say that, no you are not.
 * Switching is done very easily, without affecting or ruining anything.
    Go to 
   Appearance, Activate another theme, go test your plugin, and if it works then
   we know it’s a theme related issue, and when you are done, activate your theme
   again, and nothing is gone or changed. That’s why theme files are stored and 
   edited separately, so you can change the look of your website every day, with
   all of your things the same they are.It’s just a press of a button.
 * By the way, I really like helping younger 🙂
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [14 years, 1 month ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/#post-2613694)
 * > Is there no other way?
 * No. Troubleshooting is a process of elimination. Some times you will be asked
   to switch themes as part of that process. With luck, the change will only be 
   temporary but, in some cases, it proves that the problems are within the theme(
   in which case, you may have to consider using another theme).
 * Bottom line: do you want a working site? If the answer is “yes”, then please 
   help us to help you by following the suggestions you have been given.

Viewing 15 replies - 1 through 15 (of 26 total)

1 [2](https://wordpress.org/support/topic/need-help-placing-a-code-please/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/need-help-placing-a-code-please/page/2/?output_format=md)

The topic ‘Need Help Placing A Code Please!’ is closed to new replies.

## Tags

 * [code](https://wordpress.org/support/topic-tag/code/)
 * [place](https://wordpress.org/support/topic-tag/place/)
 * [to](https://wordpress.org/support/topic-tag/to/)
 * [where](https://wordpress.org/support/topic-tag/where/)

 * 26 replies
 * 6 participants
 * Last reply from: [Nihad Nagi](https://wordpress.org/support/users/nihadnagi/)
 * Last activity: [14 years ago](https://wordpress.org/support/topic/need-help-placing-a-code-please/page/2/#post-2613760)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
