Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8655701
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T15:06:01+00:00 2026-06-12T15:06:01+00:00

Live site. My site is set up so that an image or gallery is

  • 0

Live site.

My site is set up so that an image or gallery is displayed over a wooden background(#above), with the rest of the content below on a linen background(#below). This works well on every page but the portfolio page- the wooden space has no content until a specific gallery is selected.

Is there a way to have the linen background & content(#below) show instead of the plain wooden background(#above), until the gallery has been selected? (And if so, is it possible to have it appear to be sliding down from the top of the screen?)

header.php

<body>
<div class="above">
    <div id="header">
        <div class="logo">
            <a href="<?php bloginfo('url'); ?>"><img src="<?php echo get_template_directory_uri(); ?>/img/logo.png" alt="Urban Palate logo" id="logo" /></a>
        </div><!-- end logo -->
        <nav>
            <ul>
                <li><a href="?page_id=7"><img src="<?php echo get_template_directory_uri(); ?>/img/about.png" alt="Urban Palate intro" /></a></li>
                <li><a href="?page_id=12"><img src="<?php echo get_template_directory_uri(); ?>/img/portfolio.png" alt="Urban Palate portfolio" /></a></li>
                <li><a href="?page_id=15"><img src="<?php echo get_template_directory_uri(); ?>/img/blog.png" alt="Urban Palate blog" /></a></li>
                <li><a href="?page_id=10"><img src="<?php echo get_template_directory_uri(); ?>/img/contact.png" alt="Urban Palate contact" /></a></li>
            </ul>
        </nav>
    </div><!-- end header -->

portfolio.php

<?php
/*
Template Name: Portfolio
*/
?>

<?php get_header(); ?>  

    <div class="gallery">
       <?php     
            if( is_page( 24 ) ) {
              // make your stuff here
               echo do_shortcode('[rev_slider slider1]');
            } else {
              // output standard content here
            }

        ?>

        <?php     
            if( is_page( 26 ) ) {
              // make your stuff here
               echo do_shortcode('[rev_slider slider2]');
            } else {
              // output standard content here
            }

        ?>

        <?php     
            if( is_page( 28 ) ) {
              // make your stuff here
               echo do_shortcode('[rev_slider slider3]');
            } else {
              // output standard content here
            }

        ?>

        <?php     
            if( is_page( 30 ) ) {
              // make your stuff here
               echo do_shortcode('[rev_slider slider4]');
            } else {
              // output standard content here
            }

        ?>

        <?php     
            if( is_page( 32 ) ) {
              // make your stuff here
               echo do_shortcode('[rev_slider slider5]');
            } else {
              // output standard content here
            }

        ?>

        <?php     
            if( is_page( 34 ) ) {
              // make your stuff here
               echo do_shortcode('[rev_slider slider6]');
            } else {
              // output standard content here
            }

        ?>

        <?php     
            if( is_page( 36 ) ) {
              // make your stuff here
               echo do_shortcode('[rev_slider slider7]');
            } else {
              // output standard content here
            }

        ?>

        <?php     
            if( is_page( 42 ) ) {
              // make your stuff here
               echo do_shortcode('[rev_slider slider8]');
            } else {
              // output standard content here
            }

        ?>

    </div><!-- end gallery -->
</div><!-- end above -->
<div class="below">
    <div class="blurb">
        <img src="<?php echo get_template_directory_uri(); ?>/img/portfolio_blurb.png" alt="see who has experienced our fabulous + creative and beautiful + cutting edge decor firsthand" />
    </div><!-- end blurb -->
    <div id="client-list">
        <?php wp_nav_menu( array( 'sort_column' => 'menu_order', 'container_class' => 'menu-header' ) ); ?>
    </div><!-- end client-list -->


<?php get_footer(); ?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T15:06:03+00:00Added an answer on June 12, 2026 at 3:06 pm

    There are a lot of improvements that could be made to the code above. Investigate the switch statement, or at least ditch all the else blocks. Anyway,

    In your header.php, try

    <body>
    <div class="above <?php if (is_page(1)) echo 'short'; ?>">
        <div id="header">
            <div class="logo">
            // etc...
    

    You will need to change the is_page(1) part to have the correct page number. I don’t know how you figure this out with WordPress, but if you can do it for each gallery, you can do it for the empty portfolio page.

    Then, in your site css:

    .above.short {
        height: 200px;
    }
    

    My solution is ugly, but it will fit in with the rest of the PHP you’ve got there. If you paid developers for that work, get new developers.

    Somebody who knows WP may be able to tell you how to give div.above an additional class without resorting to inline code like I’ve done. This would be a better solution.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my live site I have php include() and require() that have full path
I have a live site that includes different php files depending on what page
Let's say I'm basically inheriting a live site that has a lot of errors
I have a wordpress site set up on a live server, and I have
Live site. Ideally, between border-top and border-bottom, I'd like to have 3 portfolio thumbnails,
I use config.ContentsCss to load the live site's styles into the editor: config.contentsCss =
I have imported my database by script from live site to my local server.
I am using Lemonstand (an e-commerce CMS) and after going live with our site
I am looking to implement a live filtering feature to my site which will
My first question and Im excited... I've lurked since go-live and love the site,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.