Featured Content Gallery | WordPress Plugin | iePlexus

Where should i put the code exactly ? Please help me.

Downloading, installing, upgrading, and configuring the FCG plugin

Re: Where should i put the code exactly ? Please help me.

PostBy cbraxton on Mon Jul 27, 2009 7:23 pm

I have placed the code in myindex.php file. The gallery now shows up on every page in my blog. I am using the atahualpa theme and I placed it just after the line <?php get_header(); ?> so that it looks like this:

<?php get_header(); ?>

<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>

This causes the gallery to show up after my header, but as I said, it shows up on all pages.

You can visit my site at www.lifeworththeliving.com to see what I mean.

How can I get it to only show up on the landing page?

Thanks for any help offered.

Mance
cbraxton
 
Posts: 5
Joined: Mon Jul 27, 2009 7:19 pm

Re: Re: Where should i put the code exactly ? Please help me.

Thank you for using the Featured Content Gallery Forum
 

Re: Where should i put the code exactly ? Please help me.

PostBy admin on Tue Jul 28, 2009 7:32 am

you can make conditional statement for your piece of code if it is home page like this:

<?php get_header(); ?>

<?php
if (is_home())
{
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
User avatar
admin
Site Admin
 
Posts: 4789
Joined: Fri Jan 16, 2009 9:29 am
Location: Seattle, WA

Re: Where should i put the code exactly ? Please help me.

PostBy cbraxton on Wed Jul 29, 2009 9:41 am

Awesome. I just copied and pasted the statement and it works great.

Thanks so much.

Visit us at www.lifeworththeliving.com to see it in action.
cbraxton
 
Posts: 5
Joined: Mon Jul 27, 2009 7:19 pm

Re: Where should i put the code exactly ? Please help me.

PostBy admin on Wed Jul 29, 2009 9:44 am

yw, your site looks nice!!!
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: 4789
Joined: Fri Jan 16, 2009 9:29 am
Location: Seattle, WA

Re: Where should i put the code exactly ? Please help me.

PostBy thorhws on Mon Aug 10, 2009 5:56 am

hello, thanks for the great plugin.

Its working, but i was wondering if you could help me with the following: i want to exclude the gallery from all the pages except the home page. i tried:

Code: Select all
<?php
if (is_page('About') )
{
  include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');
}

?>


But that does not work. please help me out :)
heres my code:
Code: Select all
<div id="header" onclick="location.href='<?php echo get_settings('home'); ?>';" style="cursor: pointer;">
   </div>

   <div id="nav">
         <div class="alignleft">
            <ul>
            <li><a href="<?php echo get_settings('home'); ?>">Home</a></li>
            <?php wp_list_pages('title_li=&depth=1'); ?>
            </ul>
                                    <?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>


         </div>
   </div>
thorhws
 
Posts: 1
Joined: Mon Aug 10, 2009 5:33 am

Re: Where should i put the code exactly ? Please help me.

PostBy admin on Mon Aug 10, 2009 8:00 am

is_home() or is_front_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
User avatar
admin
Site Admin
 
Posts: 4789
Joined: Fri Jan 16, 2009 9:29 am
Location: Seattle, WA

Re: Where should i put the code exactly ? Please help me.

PostBy perc01 on Tue Aug 11, 2009 9:25 am

Please help.

I have tried to install FCG on my website http://www.sunceremony.org

but nothing happens.

i have a static home page.

Can someone help?

Super appreciation..

<?php get_header(); ?>
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
<div class="art-contentLayout">
<?php include (TEMPLATEPATH . '/sidebar1.php'); ?><div class="art-content">

<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner art-article">
<h2 class="art-PostHeaderIcon-wrapper">
<span class="art-PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
<?php the_title(); ?>
</a></span>
</h2>
<?php ob_start(); ?>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="17" height="18" alt="" />
<?php the_time(__('F jS, Y', 'kubrick')) ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostAuthorIcon.png" width="14" height="14" alt="" />
<?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?></a>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (current_user_can('edit_post', $post->ID)): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="14" height="14" alt="" />
<?php edit_post_link(__('Edit', 'kubrick'), ''); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class="art-PostHeaderIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>
</div>
<?php endif; ?>
<?php $metadataContent = ob_get_clean(); ?>
<?php if (trim($metadataContent) != ''): ?>
<div class="art-PostMetadataHeader">
<?php echo $metadataContent; ?>

</div>
<?php endif; ?>
<div class="art-PostContent">
<?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>

</div>
<div class="cleared"></div>
<?php ob_start(); ?>
<?php $icons = array(); ?>
<?php if (!is_page()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostCategoryIcon.png" width="18" height="18" alt="" />
<?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && get_the_tags()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostTagIcon.png" width="18" height="18" alt="" />
<?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (!is_page() && !is_single()): ?><?php ob_start(); ?><img src="<?php bloginfo('template_url'); ?>/images/PostCommentsIcon.png" width="18" height="18" alt="" />
<?php comments_popup_link(__('No Comments &#187;', 'kubrick'), __('1 Comment &#187;', 'kubrick'), __('% Comments &#187;', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
<?php $icons[] = ob_get_clean(); ?><?php endif; ?><?php if (0 != count($icons)): ?>
<div class="art-PostFooterIcons art-metadata-icons">
<?php echo implode(' | ', $icons); ?>

</div>
<?php endif; ?>
<?php $metadataContent = ob_get_clean(); ?>
<?php if (trim($metadataContent) != ''): ?>
<div class="art-PostMetadataFooter">
<?php echo $metadataContent; ?>

</div>
<?php endif; ?>

</div>

</div>
</div>

<?php endwhile; ?>
<?php
$prev_link = get_previous_posts_link(__('Newer Entries &raquo;', 'kubrick'));
$next_link = get_next_posts_link(__('&laquo; Older Entries', 'kubrick'));
?>
<?php if ($prev_link || $next_link): ?>
<div class="art-Post">
<div class="art-Post-body">
<div class="art-Post-inner art-article">

<div class="art-PostContent">

<div class="navigation">
<div class="alignleft"><?php echo $next_link; ?></div>
<div class="alignright"><?php echo $prev_link; ?></div>
</div>

</div>
<div class="cleared"></div>


</div>

</div>
</div>

<?php endif; ?>
<?php else : ?>
<h2 class="center"><?php _e('Not Found', 'kubrick'); ?></h2>
<p class="center"><?php _e('Sorry, but you are looking for something that isn&#8217;t here.', 'kubrick'); ?></p>
<?php if(function_exists('get_search_form')) get_search_form(); ?>
<?php endif; ?>

</div>

</div>
<div class="cleared"></div>

<?php get_footer(); ?>
perc01
 
Posts: 3
Joined: Tue Aug 11, 2009 9:21 am

Re: Where should i put the code exactly ? Please help me.

PostBy perc01 on Tue Aug 11, 2009 9:25 am

that's my index.php btw
many thanks
perc01
 
Posts: 3
Joined: Tue Aug 11, 2009 9:21 am

Re: Where should i put the code exactly ? Please help me.

PostBy admin on Tue Aug 11, 2009 9:45 am

it looks like you need the gallery call in page.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
User avatar
admin
Site Admin
 
Posts: 4789
Joined: Fri Jan 16, 2009 9:29 am
Location: Seattle, WA

Re: Where should i put the code exactly ? Please help me.

PostBy perc01 on Wed Aug 12, 2009 12:24 am

Oh, why do i have to do that?
sorry i am new at this.
does that mean you put the

<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>

in page.php?

thanks again
perc01
 
Posts: 3
Joined: Tue Aug 11, 2009 9:21 am

PreviousNext

Return to Getting Started

Who is online

Users browsing this forum: No registered users and 0 guests