Forums

[resolved] Having Trouble with the 'else_if' coding for home page slideshow (3 posts)

  1. davidallred
    Member
    Posted 1 year ago #

    I sure appreciate some help with some code. I'm attempting to use 'else_if'. I have a slideshow that I only want showing on the home page and not when someone clicks "older entries" on the second page and third and so on.

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

    Everything I have tried thus far pulled up an error. Any help would be sweet.

    Thanks,

  2. alchymyth
    The Sweeper
    Posted 1 year ago #

    try:

    <?php if( !is_paged() ) { include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); } ?>

    if it not a paginated page, show the gallery.

    http://codex.wordpress.org/Conditional_Tags
    http://codex.wordpress.org/Conditional_Tags#A_Paged_Page

    depending on your theme, you might need to combine it with is_home() or is_front_page()

  3. davidallred
    Member
    Posted 1 year ago #

    That worked beautifully! Thanks for the quick response!

Topic Closed

This topic has been closed to new replies.

About this Topic