How to make the sliding header appear on every page?

Any questions about styling and customising the layout, changing the number of columns, changing the number of sliding images and so on.

Re: How to make the sliding header appear on every page?

Postby Elemee » Sat Jun 04, 2011 6:26 pm

Has anyone tried to put the sliders on other pages in Picture Perfect (1.3.3)??? I don't believe the code is the same for the Picture Perfect theme, or not located in the same files as the Sliding Doors theme.
Elemee
I'm new here
 
Posts: 4
Joined: Sun May 29, 2011 8:16 pm

Re: How to make the sliding header appear on every page?

Postby liam » Wed Jun 22, 2011 5:39 pm

The code seems to have changed since these last posts. I've tried tinkering with the code a little in similar fashion to the previous post.

The original code looks like this:
Code: Select all
<body <?php body_class(); ?>>
<div id="wrapper" class="hfeed">
   <div id="header">
      <div id="masthead">
         <div id="branding" role="banner">
                     
            <?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>
            <<?php echo $heading_tag; ?> id="site-title">
               <span>
                  <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
               </span>
            </<?php echo $heading_tag; ?>>
            <div id="site-description"><?php bloginfo( 'description' ); ?></div>


            <div id="imageMenu">
      
            <!-- THESE ARE THE LINKS YOU GO TO WHEN YOU CLICK ON A SLIDING DOOR IMAGE-->
            <!-- change the href to look like this: <a href="yourlink.com">     -->
            <?php
            $walker = new My_Walker;
            wp_nav_menu( array(
            'theme_location' => 'custom-sliding-menu',
            'fallback_cb' => 'no_sliding_menu',
            'container' => '',
            'container_class' =>'',
            'container_id' =>'',
            'menu_class' =>'',
            'menu_id' =>'',
            'depth' => '1', 
            'walker' => $walker
            )
            ); ?>
            
         </div>
            
<script type="text/javascript">
         
         window.addEvent('domready', function(){
            var myMenu = new ImageMenu($$('#imageMenu a'),{openWidth:310, border:2, onOpen:function(e,i){location=(e);}});
         });
      </script>   


There is no line with an explicit "if" statement. The closest is the implied "if" statement on this line:
Code: Select all
<?php $heading_tag = ( is_home() || is_front_page() ) ? 'h1' : 'div'; ?>


...which, when changed to look like this:
Code: Select all
<?php $heading_tag = ( is_home() || is_front_page() || if_page() || is_category() || is_single() ) ? 'h1' : 'div'; ?>


...does not change the behavior of the sliding images. With the new code, how should I go about changing the code to allow the sliding images on every page? I've been tinkering with it a little while with no success.

LiamC
liam
I'm new here
 
Posts: 1
Joined: Wed Jun 22, 2011 5:06 pm
Location: Wausau, WI, USA

Re: How to make the sliding header appear on every page?

Postby ozarek » Fri Jul 01, 2011 11:36 am

Just add
Code: Select all
<?php if( (is_home()) or (is_page(xxx))) { ?>
xxx - your home page number


above
Code: Select all
<div id="imageMenu">


do not forget to close php under div

Code: Select all
   </div>
<?php } ?>   


the section should look like this
Code: Select all
<?php if( (is_home()) or (is_page(xxx))) { ?>
            <div id="imageMenu">
      
            <!-- THESE ARE THE LINKS YOU GO TO WHEN YOU CLICK ON A SLIDING DOOR IMAGE-->
            <!-- change the href to look like this: <a href="yourlink.com">     -->
            <?php
            $walker = new My_Walker;
            wp_nav_menu( array(
            'theme_location' => 'custom-sliding-menu',
            'fallback_cb' => 'no_sliding_menu',
            'container' => '',
            'container_class' =>'',
            'container_id' =>'',
            'menu_class' =>'',
            'menu_id' =>'',
            'depth' => '1', 
            'walker' => $walker
            )
            ); ?>
            
         </div>
<?php } ?>
ozarek
I'm new here
 
Posts: 3
Joined: Wed Mar 30, 2011 7:29 am

Re: How to make the sliding header appear on every page?

Postby britr12 » Thu Oct 20, 2011 11:25 pm

Hello All,

I'm new to the forum and I am trying to get my website to run. I think that since the new version of Picture Perfect 1.3.3 is up, the codes have changed. I've tried to follow the advice on here, but nothing has happened. Here is what my header.php looks like now:

<?php if ( !(is_404()) && (is_single()) or (is_page()) or (is_archive()) ) { ?> &raquo; <?php wp_title(''); ?><?php } ?></title>

<meta name="generator" content="WordPress <?php bloginfo('version'); ?>" />
<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="<?php bloginfo('name'); ?> RSS Feed" href="<?php bloginfo('rss2_url'); ?>" />
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
<?php wp_head(); ?>


<?php $url = get_stylesheet_directory_uri()?>
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $url; ?>/imagemenu/imageMenu.css">
<script type="text/javascript" src="<?php echo $url; ?>/imagemenu/mootools.js"></script>
<script type="text/javascript" src="<?php echo $url; ?>/imagemenu/imageMenu.js"></script>



</head>

<body>

<div id="wrapper">

<div id="welcomeheading">
<h1><a href="<?php bloginfo('url'); ?>/">

<?php $replacethese = array('[',']');
$replacewith = array('<span><div align="center"><img src="http://desmond.imageshack.us/Himg687/scaled.php?server=687&filename=logofinished.jpg&res=medium" width="940" height="200"></div></span>');
echo str_replace($replacethese, $replacewith, get_bloginfo('title')); ?>
</a></h1>
<div id="description"><?php bloginfo('description'); ?></div>
</div>


<div id="imageMenu">
<ul>
<?php slider_menuparse(wp_list_pages('sort_column=ID&depth=1&number=7&title_li=&echo=0')); ?>
</ul>
</div> <!-- END imagemenu -->



<script type="text/javascript">

window.addEvent('domready', function(){
var myMenu = new ImageMenu($$('#imageMenu a'),{openWidth:300, border:2, onOpen:function(e,i){location=(e);}});
});
</script>

Can someone please help tell me where to input the code so I can keep the slider menu on all pages??? thank you!
britr12
I'm new here
 
Posts: 1
Joined: Thu Oct 20, 2011 11:17 pm

Re: How to make the sliding header appear on every page?

Postby wayne » Wed Oct 26, 2011 10:28 pm

wayne
Site Admin
 
Posts: 727
Joined: Tue Apr 08, 2008 7:02 pm

How to put two sliding door on the same page?

Postby chknabil » Sun Dec 11, 2011 9:09 pm

Hi,

I used your plugin in one of my site and it works very well. But I m having problem in putting two sliders on the same page. Can you help in this?
I have used the following code to put more than one sliders on the same page.

Code: Select all
<div id="imageMenu1" class="imageMenu">
            <?php
            $walker = new My_Walker;
            wp_nav_menu( array(
            'theme_location' => 'custom-sliding-menu',
            'fallback_cb' => 'no_sliding_menu',
            'container' => '',
            'container_class' =>'',
            'container_id' =>'',
            'menu_class' =>'',
            'menu_id' =>'',
            'depth' => '1', 
            'walker' => $walker
            )
            ); ?>
            
         </div>
            
<script type="text/javascript">
         
         window.addEvent('domready', function(){
            var myMenu1 = new ImageMenu($$('#imageMenu1 a'),{openWidth:310, border:2, onOpen:function(e,i){location=(e);}});
         });
      </script>

<div id="imageMenu2" class="imageMenu">
            <?php
            $walker = new My_Walker;
            wp_nav_menu( array(
            'theme_location' => 'custom-sliding-menu',
            'fallback_cb' => 'no_sliding_menu',
            'container' => '',
            'container_class' =>'',
            'container_id' =>'',
            'menu_class' =>'',
            'menu_id' =>'',
            'depth' => '1', 
            'walker' => $walker
            )
            ); ?>
            
         </div>
            
<script type="text/javascript">
         
         window.addEvent('domready', function(){
            var myMenu2 = new ImageMenu($$('#imageMenu2 a'),{openWidth:310, border:2, onOpen:function(e,i){location=(e);}});
         });
      </script>





Thanks in Advance
Nabeel
chknabil
I'm new here
 
Posts: 2
Joined: Sun Dec 11, 2011 8:58 pm

Re: How to make the sliding header appear on every page?

Postby kalule » Thu Apr 12, 2012 5:37 am

I am not able to make any of these things work. I have the menus and the page links working, my problem is as follows:
on home page the sliders are all there and the pages are all under t he sliders. When I select one of the sliders what is shown is the designated info that I want , the sliders are all theres, but the only thing shows Is HOME and ABOUT, not the 10 other pages that are listed on the home page. But what is worst if I decide to select another slider , the 2nd or 3rd from the right, (not the very last slider), they don't go to the areas that they are to by page linkto plug-in but if they are selected from the home page they work.

my url is www.kaluletravelgroups.com or www.the-ktg-experience.com
Please help :(
kalule
I'm new here
 
Posts: 2
Joined: Thu Apr 12, 2012 2:57 am

Re: How to make the sliding header appear on every page?

Postby kalule » Thu Apr 12, 2012 5:47 am

This is the problem that I am having :
I want the slider fully functional on all pages. When I am on the home page it is fully functional, but after selecting one of the sliders it takes me to the designated page, but if I choose another slider from that page, then it is not fully functional, esp the 2nd and 3rd slider from right. The list of pages are not showing as well. I want these sliders and pages to be fully functional from any and all pages. This makes navigation much easier.



This is not what is showing on my header.php these links are in the themes function (functions.php)
Below is what it shows in my header.php

***************************************************************
Code: Select all
<?php
/**
 * The Header for our theme.
 *
 * Displays all of the <head> section and everything up till <div id="main">
 *
 * @package WordPress
 * @subpackage Sliding_Door
 * @since Sliding Door 1.0
 */
?><!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<title><?php
   /*
    * Print the <title> tag based on what is being viewed.
    */
   global $page, $paged;

   wp_title( '|', true, 'right' );

   // Add the blog name.
   bloginfo( 'name' );

   // Add the blog description for the home/front page.
   $site_description = get_bloginfo( 'description', 'display' );
   if ( $site_description && ( is_home() || is_front_page() ) )
      echo " | $site_description";

   // Add a page number if necessary:
   if ( $paged >= 2 || $page >= 2 )
      echo ' | ' . sprintf( __( 'Page %s', 'slidingdoor' ), max( $paged, $page ) );

   ?></title>
<link rel="profile" href="http://gmpg.org/xfn/11" />
<link rel="stylesheet" type="text/css" media="all" href="<?php bloginfo( 'stylesheet_url' ); ?>" />
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />
<?php
   /* We add some JavaScript to pages with the comment form
    * to support sites with threaded comments (when in use).
    */
   if ( is_singular() && get_option( 'thread_comments' ) )
      wp_enqueue_script( 'comment-reply' );

   /* Always have wp_head() just before the closing </head>
    * tag of your theme, or you will break many plugins, which
    * generally use this hook to add elements to <head> such
    * as styles, scripts, and meta tags.
    */
   wp_head();
?>

<?php $url = get_template_directory_uri()?>
<link rel="stylesheet" type="text/css" media="screen" href="<?php echo $url; ?>/imagemenu/imageMenu.css">
<script type="text/javascript" src="<?php echo $url; ?>/imagemenu/mootools.js"></script>
<script type="text/javascript" src="<?php echo $url; ?>/imagemenu/imageMenu.js"></script>

</head>

<body <?php body_class(); ?>>
<div id="wrapper" class="hfeed">
   <div id="header">
      <div id="masthead">
         <div id="branding" role="banner">
                     
            <?php $heading_tag = ( is_home() || is_front_page() || is_page() || is_single() ) ? 'h1' : 'div'; ?>
            <<?php echo $heading_tag; ?> id="site-title">
               <span>
                  <a href="<?php echo home_url( '/' ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home"><?php bloginfo( 'name' ); ?></a>
               </span>
            </<?php echo $heading_tag; ?>>
            <div id="site-description"><?php bloginfo( 'description' ); ?></div>


            <div id="imageMenu">
      
            <!-- THESE ARE THE LINKS YOU GO TO WHEN YOU CLICK ON A SLIDING DOOR IMAGE-->
            <!-- change the href to look like this: <a href="yourlink.com">     -->
            <?php
            $walker = new My_Walker;
            wp_nav_menu( array(
            'theme_location' => 'custom-sliding-menu',
            'fallback_cb' => 'no_sliding_menu',
            'container' => '',
            'container_class' =>'',
            'container_id' =>'',
            'menu_class' =>'',
            'menu_id' =>'',
            'depth' => '1', 
            'walker' => $walker
            )
            ); ?>
            
         </div>
            
<script type="text/javascript">
         
         window.addEvent('domready', function(){
            var myMenu = new ImageMenu($$('#imageMenu a'),{openWidth:310, border:2, onOpen:function(e,i){location=(e);}});
         });
      </script>   

            
         </div><!-- #branding -->

         <div id="access" role="navigation">
           <?php /*  Allow screen readers / text browsers to skip the navigation menu and get right to the good stuff */ ?>
            <div class="skip-link screen-reader-text"><a href="#content" title="<?php esc_attr_e( 'Skip to content', 'slidingdoor' ); ?>"><?php _e( 'Skip to content', 'slidingdoor' ); ?></a></div>
            <?php /* Our navigation menu.  If one isn't filled out, wp_nav_menu falls back to wp_page_menu.  The menu assiged to the primary position is the one used.  If none is assigned, the menu with the lowest ID is used.  */ ?>
            <?php wp_nav_menu( array( 'container_class' => 'menu-header', 'theme_location' => 'primary') ); ?>
         </div><!-- #access -->
      </div><!-- #masthead -->
   </div><!-- #header -->

   <div id="main">
kalule
I'm new here
 
Posts: 2
Joined: Thu Apr 12, 2012 2:57 am

Re: How to make the sliding header appear on every page?

Postby Andrew P » Tue Aug 28, 2012 2:05 am

Nearly all this thread is completely redundant if you are on Version 3.
From what I can make out, header.php will display the image menu on every page.

If, like me, you do want to turn off the imagemenu on pages other than the home page, you will need to add something like this:
In header.php, around line 106 (in version 3.0.8), replace
Code: Select all
            <div id="imageMenu">

with
Code: Select all
            <div id="imageMenu"  <?php if (!is_home() && !is_front_page()) echo "style=\"display:none\" " ?> >

The reason I just do a display:none rather than skip over the menu creation call (which would save page load speed, depending on what can be cached by the browser) is that there is extra stuff that is being done further down in the php file, making this the simplest intervention.
Andrew P
Legend!
 
Posts: 12
Joined: Mon Nov 29, 2010 7:44 am
Location: Hall, ACT, Australia

Previous

Return to Advanced - Customising the theme



cron