WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Help with custom theme - Gallery (7 posts)

  1. Steve
    Member
    Posted 2 years ago #

    I would like to have gallery under my navigation bar and above my main content on my static home page only.

    my front-page.php looks like:
    Logo
    Nav Bar
    Featured Content <- I would like to have my gallery here
    Main Content
    Sidebar
    footer

    I want my Gallery to follow my own css and to suit my theme. I tried using NextGEN Gallery however I can only seem to get the gallery inserted on pages were I put the [gallery=1] inside the page via the admin panel (but not from back end code). Which puts the gallery were my main content is.

    What code do I need to use to have a gallery in my featured content section of my home page?

    I would like something like the layout found at:
    http://absolutegaming.co.uk/

    But only for my home page! Can anybody point me in the right direction?

    TIA,
    Steve

  2. Gary Darling
    Member
    Posted 2 years ago #

    See:
    http://codex.wordpress.org/Gallery_Shortcode
    http://codex.wordpress.org/Template_Hierarchy#Home_Page_display

    You can modify either home.php or front-page.php with the do_shortcode template tag to get exactly what you are looking for.

  3. Steve
    Member
    Posted 2 years ago #

    Thanks very much for the reply Gary,

    I think I'm adding it correctly, I have added the following to my front-page.php within my featured content section:

    <?php echo do_shortcode('[nggallery id=1]'); ?>

    I get small thumb nail, I havent spent much time with it yet but I would imagine I can customize it with css or within the NextGEN Gallery options.

    Once again many thanks for your help!

  4. Steve
    Member
    Posted 2 years ago #

    The above code:
    <?php echo do_shortcode('[nggallery id=1]'); ?>

    Seems to add the gallery as a whole to the section I want.
    i.e image one appears as a thumb and the rest of the images are right beside it. I tried playing around with the settings but I'm fairly sure I need to add more to the above code.

    Also
    [Show as slideshow] appears as a link over the images and when I click the link it brings me to my blog page.

    Any ideas on how I can begin to fix these problems

    TIA,
    Steve

  5. Gary Darling
    Member
    Posted 2 years ago #

    I'm not sure what else you would like to see, maybe a link to an example?

  6. Steve
    Member
    Posted 2 years ago #

    Hi,

    Sorry for not explaining better. I'm trying to achieve something similar to the slider found at: http://www.bbc.co.uk/
    And put it at the top of my site.

    I figured out the solution to my problem. The links you provided were correct, I inserted the wrong code into my front-page.php

    I originally put in:
    <?php echo do_shortcode('[nggallery id=1]'); ?>
    Which inserted the whole gallery into the top section of the page.

    By replacing the above with <?php echo do_shortcode('[slideshow id=1]'); ?>
    fixed the problem and placed a slide show in the top section which is what I wanted.

    Thanks again for your help!

  7. Gary Darling
    Member
    Posted 2 years ago #

    Good to hear, maybe you can mark this thread as resolved?

Topic Closed

This topic has been closed to new replies.

About this Topic