私のサイトは、画像またはギャラリーが木製の背景(#above
)の上に表示され、残りのコンテンツはリネンの背景(#below
)の上に表示されるように設定されています。これはすべてのページでうまく機能しますが、ポートフォリオページ-特定のギャラリーが選択されるまで、木製のスペースにはコンテンツがありません。
ギャラリーが選択されるまで、#below
無地の木製の背景()の代わりにリネンの背景とコンテンツ()を表示する方法はありますか?#above
(もしそうなら、それを画面の上から下にスライドさせているように見せることは可能ですか?)
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(); ?>