Hi all,
Just a quick question - how, if possible at all, can I put the FCG to display on ONE POST (or PAGE) only of my Wordpress site? I don't want it to appear on every page and there don't want to put it in the site's template.
Thanks.
Can I put the FCG in ONE POST only - Atahualpa theme
24 posts • Page 1 of 3 • 1, 2, 3
- Thank you for using the Featured Content Gallery Forum
Re: Can I put the FCG in ONE POST only & not the site template?
You can do it like this
if it is a post
you need to open single.php in theme editor and put
line like this
<?php if (is_single('Your post title here') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
if it is a post
you need to open single.php in theme editor and put
line like this
<?php if (is_single('Your post title here') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
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
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
-

admin - Site Admin
- Posts: 4738
- Joined: Fri Jan 16, 2009 9:29 am
- Location: Seattle, WA
Re: Can I put the FCG in ONE POST only & not the site template?
Hi Yelena, thanks so much for your prompt reply.
I'm still have a bit of trouble - could you give me some more detailed instructions please?
I'm using Atahualpa theme which doesn't have a single.php file.
I created one by copy-pasting the contents of index.php to a new file called single.php. Right at the bottom of the pile, I justed pasted in the text you gave us above, changing the 'Your post here' bit as appropriate.
In the relevant post, I pasted in the HTML window:
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
verbatim, no <code></code> stuff and I can't see the gallery yet.
Any ideas on what I haven't done right? Thanks again!
I'm still have a bit of trouble - could you give me some more detailed instructions please?
I'm using Atahualpa theme which doesn't have a single.php file.
I created one by copy-pasting the contents of index.php to a new file called single.php. Right at the bottom of the pile, I justed pasted in the text you gave us above, changing the 'Your post here' bit as appropriate.
In the relevant post, I pasted in the HTML window:
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
verbatim, no <code></code> stuff and I can't see the gallery yet.
Any ideas on what I haven't done right? Thanks again!
- sciencehub
- Posts: 7
- Joined: Mon Sep 14, 2009 3:05 pm
Re: Can I put the FCG in ONE POST only & not the site template?
interesting theme..usually worpdress theme has different structure and has single.php page..
but in this theme it looks really complicated...but anyway I like the layout..
I downloaded the theme to figure out how to do the task you asking for...
In Atahualpa Options on the left menu find
Post & Pages Edit POST/PAGE INFO ITEMS
click on it...then scroll to
on the text box below put this gallery call
where 'Your post title here' is the name of your page..
save the settings and gallery should appear in the specified page
but in this theme it looks really complicated...but anyway I like the layout..
I downloaded the theme to figure out how to do the task you asking for...
In Atahualpa Options on the left menu find
Post & Pages Edit POST/PAGE INFO ITEMS
click on it...then scroll to
- Code: Select all
BYLINE: Single Post Pages
Leave blank to display no byline on posts on single post pages.
Example: By %author%, on %date('F jS, Y')%"
on the text box below put this gallery call
- Code: Select all
<?php if (is_single('Your post title here') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
where 'Your post title here' is the name of your page..
save the settings and gallery should appear in the specified page
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
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
-

admin - Site Admin
- Posts: 4738
- Joined: Fri Jan 16, 2009 9:29 am
- Location: Seattle, WA
Re: Can I put the FCG in ONE POST only & not the site template?
Hi Yelena,
Thanks for all the trouble you went to downloading the theme and experimenting. The place I wanted the FCG to feature was a page, so your direction above is excellent for a post, but for a page, the directions go in the next box down underneath.
BYLINE: "Page" PagesLeave blank to display no byline on "page" pages.
NOTE: "Page" pages don't have categories or tags
Putting a line of simple text in this box shows up in the right place on my 'Gallery' page.
However, I'm still not seeing the FCG there when I paste in your code.
I've tried the following:
1. simply pasting in your code on the Atahualpa theme page with no php instructions in the 'Gallery' page itself
2. pasting in your code on the Atahualpa theme page with the
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
code in the 'Gallery' page itself
and I've checked the basics - I've got two post IDs listed to rotate.
I've still got the single.php file I generated above with the instructions 'if single'. Although now I've engaged my brain a bit more I'm questioning exactly what 'if single' means - on my homepage I've got a PAGE navigation menu with SEVERAL pages to click on if people choose, with the Gallery page only being one of them. Is that important?
I've used FCG on another site, with a different theme and really like how it worked, so I'd really like to persist with this.
Thanks for all the trouble you went to downloading the theme and experimenting. The place I wanted the FCG to feature was a page, so your direction above is excellent for a post, but for a page, the directions go in the next box down underneath.
BYLINE: "Page" PagesLeave blank to display no byline on "page" pages.
NOTE: "Page" pages don't have categories or tags
Putting a line of simple text in this box shows up in the right place on my 'Gallery' page.
However, I'm still not seeing the FCG there when I paste in your code.
I've tried the following:
1. simply pasting in your code on the Atahualpa theme page with no php instructions in the 'Gallery' page itself
2. pasting in your code on the Atahualpa theme page with the
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
code in the 'Gallery' page itself
and I've checked the basics - I've got two post IDs listed to rotate.
I've still got the single.php file I generated above with the instructions 'if single'. Although now I've engaged my brain a bit more I'm questioning exactly what 'if single' means - on my homepage I've got a PAGE navigation menu with SEVERAL pages to click on if people choose, with the Gallery page only being one of them. Is that important?
I've used FCG on another site, with a different theme and really like how it worked, so I'd really like to persist with this.
- sciencehub
- Posts: 7
- Joined: Mon Sep 14, 2009 3:05 pm
Re: Can I put the FCG in ONE POST only & not the site template?
The results of a few other experiments:
1. When I added
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
to the box underneather
BYLINE: "Page" Pages
I observe the scrolling black/white lines on every page, but not the FCG working
2. When I added ALL of the following:
<?php if (is_single('Gallery') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
all to the bottom of the index.php file
I get the FCG working correctly in the footer of all the pages.
I think this is because I paste in the code right at the end of the file, directly beneath:
<?php get_footer(); ?>
3. When I added ALL of the following
<?php if (is_single('Your post title here') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
all to the bottom of the single.php file
I get no sign of the FCG
So, this is the index.php file:
1. Where do you think the best place is to put the FCG command so it appears higher up the page and in the right place on the site?
2. How do you think I can show it only the 'Gallery' page?
Should I be looking at additional commands in the Atahualpa Theme options panel:
Various content items --> Add HTML/CSS inserts OR
Center Column --> Style & Edit Center Column?
Thank you!
1. When I added
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
to the box underneather
BYLINE: "Page" Pages
I observe the scrolling black/white lines on every page, but not the FCG working
2. When I added ALL of the following:
<?php if (is_single('Gallery') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
all to the bottom of the index.php file
I get the FCG working correctly in the footer of all the pages.
I think this is because I paste in the code right at the end of the file, directly beneath:
<?php get_footer(); ?>
3. When I added ALL of the following
<?php if (is_single('Your post title here') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
all to the bottom of the single.php file
I get no sign of the FCG
So, this is the index.php file:
<?php /* get all options: */
include (TEMPLATEPATH . '/functions/bfa_get_options.php');
get_header(); ?>
<?php /* If there are any posts: */
if (have_posts()) : $bfa_ata['postcount'] == 0; /* Postcount needed for option "XX first posts full posts, rest excerpts" */ ?>
<?php /* This outputs the next/previous post or page navigation.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_above_loop']); ?>
<?php /* The LOOP starts here. Do this for all posts: */
while (have_posts()) : the_post(); $bfa_ata['postcount']++; ?>
<?php /* Add Odd or Even post class so post containers can get alternating CSS style (optional) */
$odd_or_even = (($bfa_ata['postcount'] % 2) ? 'odd-post' : 'even-post' ); ?>
<?php /* This is the actual Wordpress LOOP.
The output can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_inside_loop']); ?>
<?php /* END of the LOOP */
endwhile; ?>
<?php /* This outputs the next/previous post or page navigation and the comment template.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_below_loop']); ?>
<?php /* END of: If there are any posts */
else : /* If there are no posts: */ ?>
<?php /* This outputs the "Not Found" content, if neither posts, pages nor attachments are available for the requested page.
This can be edited at Atahualpa Theme Options -> Style & edit the Center column */
bfa_center_content($bfa_ata['content_not_found']); ?>
<?php endif; /* END of: If there are no posts */ ?>
<?php bfa_center_content($bfa_ata['center_content_bottom']); ?>
<?php get_footer(); ?>
<?php if (is_single('Gallery') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
1. Where do you think the best place is to put the FCG command so it appears higher up the page and in the right place on the site?
2. How do you think I can show it only the 'Gallery' page?
Should I be looking at additional commands in the Atahualpa Theme options panel:
Various content items --> Add HTML/CSS inserts OR
Center Column --> Style & Edit Center Column?
Thank you!
- sciencehub
- Posts: 7
- Joined: Mon Sep 14, 2009 3:05 pm
Re: Can I put the FCG in ONE POST only & not the site template?
For page it will be different..function is_single() only works for post, for page it will be function is_page()
Under
BYLINE: "Page" Pages
insert
Under
BYLINE: "Page" Pages
insert
- Code: Select all
<?php if (is_page('your title here') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
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
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
-

admin - Site Admin
- Posts: 4738
- Joined: Fri Jan 16, 2009 9:29 am
- Location: Seattle, WA
Re: Can I put the FCG in ONE POST only & not the site template?
Perfect! That did the job exactly. Thank you so much for your time, patience, and most of all, for the answer. Much appreciated.
- sciencehub
- Posts: 7
- Joined: Mon Sep 14, 2009 3:05 pm
Re: Can I put the FCG in ONE POST only & not the site template?
yw
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
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
-

admin - Site Admin
- Posts: 4738
- Joined: Fri Jan 16, 2009 9:29 am
- Location: Seattle, WA
Re: Can I put the FCG in ONE POST only & not the site template?
Today I am going to put FCG on another site of mine where I only want it to display on one page, similar to the OP.
Below you gave the code for putting the FCG on only one post using single.php - I gather I will need to do a similar thing in page.php and name the page?
However, I wanted to ask if you could please post the code and instructions for doing this for a single page, to make sure I get it right (or at least have a better chance of getting it to work right LOL).
Thanks
Sue
Below you gave the code for putting the FCG on only one post using single.php - I gather I will need to do a similar thing in page.php and name the page?
However, I wanted to ask if you could please post the code and instructions for doing this for a single page, to make sure I get it right (or at least have a better chance of getting it to work right LOL).
Thanks
Sue
admin wrote:You can do it like this
if it is a post
you need to open single.php in theme editor and put
line like this
<?php if (is_single('Your post title here') )
{
include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}
?>
- SusanneUK
- Posts: 6
- Joined: Thu Jun 25, 2009 12:30 am
24 posts • Page 1 of 3 • 1, 2, 3
Return to Plugin Settings, Features, and Options
Who is online
Users browsing this forum: No registered users and 0 guests









