Featured Content Gallery | WordPress Plugin | iePlexus

Only FCG showing on static home page

Downloading, installing, upgrading, and configuring the FCG plugin

Only FCG showing on static home page

PostBy trunyan on Sat Apr 30, 2011 11:31 am

Love the plugin and so far easy to use! I am using WP 3.1.1 with the Mumrik theme. I have greated a page called "Home", added some text and via WP settings designated this as my static home page. I then edited my page.php and added the following code
Code: Select all
<?php if( is_front_page() ) {include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php');} ?>


FCG appears fine on the home page but the text I added to the page called "home" does not show up. All other pages are working fine. Is there something I missed in the configuration?

http://dsmtri.com.previewdns.com/wordpress/

Thanks a ton
trunyan
 
Posts: 3
Joined: Sat Apr 30, 2011 11:22 am

Re: Only FCG showing on static home page

Thank you for using the Featured Content Gallery Forum
 

Re: Only FCG showing on static home page

PostBy trunyan on Tue May 03, 2011 4:53 pm

Anyone got any ideas on this or having the same issue? Thanks in advance.
trunyan
 
Posts: 3
Joined: Sat Apr 30, 2011 11:22 am

Re: Only FCG showing on static home page

PostBy admin on Wed May 04, 2011 7:48 am

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: Only FCG showing on static home page

PostBy trunyan on Wed May 04, 2011 10:42 am

Okay I found the solution but it leaves me more puzzled than before. I looked at the link you gave me and then I started hunting through the code. What I found is that in gallery.php after you do the while loop ("old way") I had to add
Code: Select all
<?php wp_reset_postdata(); ?>
. For whatever reason this fixed my issue and now its working fine. Not sure if I am the only one having this but I hope this helps. Thanks for your help in pointing me in the right direction. gallery.php code as follows

Code: Select all
<div id="featured">
   <script type="text/javascript">
        function startGallery() {
            var myGallery = new gallery($('myGallery'), {
                timed: true
            });
        }
        window.addEvent('domready',startGallery);
    </script>

    <style type="text/css">
   
   .jdGallery .slideInfoZone
   {
      height: <?php echo get_option('gallery-info'); ?>px;
   }
   </style>
   
    <div id="myGallery">
    <?php
    $imgthumb = get_option('gallery-use-thumb-image') ? "thumbnailimg" : "articleimg";
    $wordquantity = get_option('gallery-rss-word-quantity') ?  get_option('gallery-rss-word-quantity') : 100;
    if (get_option('gallery-way') == 'new')   {//new way
          $arr = split(",",get_option('gallery-items-pages'));
          if (get_option('gallery-randomize-pages'))
          {
              shuffle($arr);
          }
          foreach ($arr as $post_or_page_id)   
          {
             get_a_post($post_or_page_id); ?>
             <div class="imageElement">
                <h2><?php the_title() ?></h2>
                <?php
                  if(get_option('gallery-use-featured-content')) {?>
                    <p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
                 <?php
                 } else {
                 ?>
                    <p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
                 <?php
                  }
                  ?>
                 <a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
                 <img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
                 <img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
              </div>
          <?php
          } ?>
        </div>
        <?php
     }
     else { ?>
       <?php $my_query = new WP_Query('category_name=' . get_option('gallery-category') . '&showposts=' . get_option('gallery-items'));   ?>
       <?php while ($my_query->have_posts())
          {
             $my_query->the_post();  ?>
          <div class="imageElement">
            <h2><?php the_title() ?></h2>
            <?php
                  if(get_option('gallery-use-featured-content')) {?>
                    <p><?php $key="featuredtext"; echo get_post_meta($post->ID, $key, true); ?></p>
                 <?php
                 } else {
                 ?>
                    <p><?php the_content_rss('', 0, '', $wordquantity); ?></p>
                 <?php
                  }
                  ?>
                 <a href="<?php the_permalink() ?>" title="Read More" class="open"></a>
                 <img src="<?php $key="articleimg"; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="full" />
                 <img src="<?php $key=$imgthumb; echo get_post_meta($post->ID, $key, true); ?>" alt="<?php $key="alttext"; echo get_post_meta($post->ID, $key, true); ?>" class="thumbnail" />
         </div>
         <?php } ?>
       <?php wp_reset_postdata(); ?>
       </div>
     <?php
     }?>
   
</div>
trunyan
 
Posts: 3
Joined: Sat Apr 30, 2011 11:22 am


Return to Getting Started

Who is online

Users browsing this forum: No registered users and 0 guests