Forums

Featured Content Slider Help - PHP (6 posts)

  1. depruett
    Member
    Posted 5 months ago #

    I'm using a theme that has a built-in featured content slider. It has a text overlay at the bottom that I'd like to disable, but that isn't offered as an option in the theme settings. I know a little about PHP, but not enough to be able to isolate that particular piece of code.

    I've tried some other plug-ins as replacements (slideshow and content slider plug-ins), but none of them integrate as well as the built-in one - except, again, I'm finding the text overlay feature really intrusive.

    I have posted the code below. If there's anyone proficient in PHP who could take a look, I'd be very grateful.

    Thanks!
    David

    '<?php $featured_category = get_theme_option('featured_category'); $featured_number = get_theme_option('featured_number'); ?>

    <?php if(($featured_category == "Choose a category:") || ($featured_number == 'Number of post:')) { ?>

    <?php { /* nothing */ } ?>

    <?php } else { ?>

    <div id="featured">
    <div id="featured-title">Featured News</div>
    <div id="Gallerybox">
    <script type="text/javascript">
    function startGallery() {
    var myGallery = new gallery($('myGallery'), {
    timed: true,
    delay: 5000,
    showArrows: true,
    showCarousel: false,
    embedLinks: true
    });
    document.gallery = myGallery;
    }
    window.onDomReady(startGallery);
    </script>

    <div id="myGallery">

    <?php
    $my_query = new WP_Query('cat='. $featured_category . '&' . 'showposts='. $featured_number . '&' . 'orderby=date');
    while ($my_query->have_posts()) : $my_query->the_post();
    $do_not_duplicate = $post->ID;
    $the_post_ids = get_the_ID();
    ?>

    <div class="imageElement post-<?php the_ID(); ?>">
    <?php $values = get_post_custom_values("feat-img"); if (isset($values[0])) : ?>
    <img src="<?php $values = get_post_custom_values("feat-img"); echo $values[0]; ?>" class="full" alt="<?php the_title(); ?>" />
    <?php else : ?>
    <img src="<?php echo get_featured_slider_image(); ?>" class="full" alt="<?php the_title(); ?>" />
    <?php endif; ?>
    <h3>" title="<?php the_title(); ?>"><?php the_title(); ?></h3>
    <p><?php the_featured_excerpt($excerpt_length=30); ?></p>
    " title="open image" class="open">
    </div><!-- IMAGE ELEMENT POST <?php the_ID(); ?> END -->

    <?php endwhile;?>

    </div><!-- MYGALLERY END -->
    </div><!-- GALLERBOX END -->
    </div><!-- FEATURED END -->

    <?php } ?> '

  2. rhender
    Member
    Posted 5 months ago #

    Do you have a URL for reference? I may be able to help you then.

  3. depruett
    Member
    Posted 5 months ago #

  4. rhender
    Member
    Posted 5 months ago #

    I took a look.

    I would first try to add the following rule to the top of your stylesheet in the WordPress dashboard. Like after your main rules like body etc...

    .slideInfoZone {
    display: none;
    }

    It may be as simple as that, so do that and see if it works.

  5. depruett
    Member
    Posted 5 months ago #

    That did it! Thanks so much.

    David

  6. rhender
    Member
    Posted 5 months ago #

    Sure. No problem!

    Glad it worked.

Reply

You must log in to post.

About this Topic