WordPress.org

Ready to get started?Download WordPress

Forums

Featured Content Gallery
[resolved] Pluging forces homepage to only show featured posts - Not latest (2 posts)

  1. BloggerSavvy
    Member
    Posted 3 years ago #

    This code:

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

    I was finally able to get working, however, there are serious issues that I'm still at a loss to resolve.

    In Featured Content Gallery Configuration, going to section "Select here to use category selection" and turning on radio button that says "Category Name", then inputing the category name "Favourites" does now work. The Featured Content Gallery, does display images (articleimg) for posts only in favourites category - Good!

    But... the homepage that was set to display "Your latest posts" - Configured in:

    Dashboard >> Settings >> Reading

    No longer works! It only shows posts from the Favourites category.

    If I delete the code:

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

    Then everything works properly!

    Here's what the complete snippet looks like in header.php file:

    <!-- header START -->
    <div class="container_12">
    <div id="header-wrap">
     <div class="header">
        <div id="search-bar">
          <?php include (TEMPLATEPATH . '/searchform.php'); ?>
        </div>
        <h1><a href="<?php echo get_option('home'); ?>/">
          <?php bloginfo('name'); ?>
          </a></h1>
        <div class="description">
          <?php bloginfo('description'); ?>
        </div>
        <div style="clear: both"></div>
      </div>
      <div id="nav-bar">
        <div id="navbar-left">
          <ul id="nav">
    <?php wp_list_categories('exclude=1,4,12,7,8,10,653&title_li='); ?>
    <?php wp_list_pages('exclude=38,1211,1227,1397,1444,1489&title_li='); ?>
    <li><a href="http://xxxxxxxx.com/xxxxxxxx">Twitter</a></li>
    <li><a href="<?php bloginfo('rss_url'); ?>">Subscribe</a></li>
          </ul>
        </div>
        <div id="navbar-right"> <a href="<?php bloginfo('rss_url'); ?>"><img src="<?php bloginfo('template_url'); ?>/images/rss.gif" alt="Subscribe to <?php bloginfo('name'); ?>" /></a>
        </div>
      </div>
        <div style="clear: both"></div>
    <div>
    <?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
    </div>
    <div style="clear: both"></div>
    <div id="alignbar"></div>
    </div>
    <!-- header END -->

    Anyone encounter this issue before? Or more to the point, have a fix or work around?

  2. BloggerSavvy
    Member
    Posted 3 years ago #

    After much trouble and lengthy testing, we found out that placing the code:

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

    in header.php (so the gallery appears on every page), will break how WP features function and cause the previously mentioned issues.

    Instead, the code needs to be placed on the appropriate template pages, index.php, single.php, archive.php and so on...

    It can be placed just under the header, something that looks like this:

    <?php get_header(); ?>
    <div id="posty">
    <?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
    </div>
    <div style="clear: both"></div>

    I wish there was better documentation (more in depth) as I was not able to find a solution anywhere else.

    One other thing, if you do not want the "Featured Content" (rectangle + text) to display on the upper right of each gallery image, there is no option to disable this. However, you can edit the file:

    .../wp-content/plugins/featired-content-gallery/css/jd.gallery.css.php

    Look for:

    .jdGallery a.carouselBtn, .jdGallery a.carouselBtn:hover, .jdGallery a.carouselBtn:active
    {
    display:none !important;
    position: absolute;
    bottom: 0;
    right: 30px;
    height: 20px;
    /*width: 100px; background: url('img/carousel_btn.gif') no-repeat;*/
    text-align: center;
    padding: 0 10px;
    font-size: 13px;
    background: <?php echo $fcg_bgcolor; ?>;
    color: <?php echo $fcg_textcolor; ?> !important;
    cursor: pointer;
    }

    and add the following line (to that above CSS style directive:

    display:none !important;

    Again, I hope this really helps some of you out!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic