Advertisement:

Author Topic: Static page in the Header menu  (Read 3871 times)

Ermitage

  • Newbie
  • *
  • Posts: 37
Static page in the Header menu
« on: May 27, 2013, 12:20:23 am »
Hi, I tried to add a list of static page in the header menu like the footer menu, I add to header.php file the following code
Code: [Select]
<ul id="header-nav">
            <li><a href="<?php echo osc_contact_url(); ?>"><?php _e('Contact''realestate') ; ?></a></li>   
            <?php osc_reset_static_pages() ;
            
$i 1;
            while( 
osc_has_static_pages() ) {
                
$last '';
                if(
$i == osc_count_static_pages()){
                    
$last 'class="last"';
                }
            
?>

                <li <?php echo $last?>><a href="<?php echo osc_static_page_url() ; ?>"><?php echo osc_static_page_title() ; ?></a></li>   
            <?php
                $i
++;
            }
            
?>
     
        </ul>

The result is that the pages are listed but when I go to the page, the content is not visible. If I remove that code in the header and i use the links for pages in the footer, I see pages correctly

Any idea?

Ermitage

  • Newbie
  • *
  • Posts: 37
Re: Static page in the Header menu
« Reply #1 on: May 28, 2013, 12:18:24 am »
nobody can help me? :'(

Ermitage

  • Newbie
  • *
  • Posts: 37
Re: Static page in the Header menu
« Reply #2 on: June 04, 2013, 01:17:54 am »
Please anybody can help me!!!!   :'( :'(

Cherry

  • Newbie
  • *
  • Posts: 1
Re: Static page in the Header menu
« Reply #3 on: August 08, 2013, 02:09:22 am »
Did you solve this problem?

frosticek

  • Hero Member
  • *****
  • Posts: 3948
Re: Static page in the Header menu
« Reply #4 on: August 10, 2013, 06:22:11 pm »
@Ermitage

Hi man, it means when you click on link, you are not on right site? You can check url of link if it is correct, problem will be probably there.

Janmejay

  • Newbie
  • *
  • Posts: 1
Re: Static page in the Header menu
« Reply #5 on: February 23, 2015, 02:18:55 pm »
Move the <?php osc_reset_static_pages(); ?> below while loop. Cheers!

evrensel

  • Newbie
  • *
  • Posts: 2
Re: Static page in the Header menu
« Reply #6 on: June 25, 2016, 05:44:36 pm »
Move the <?php osc_reset_static_pages(); ?> below while loop. Cheers!

Thank you so much, I was dealing with that since many hours  :o

omid_firoznia

  • Newbie
  • *
  • Posts: 37
Re: Static page in the Header menu
« Reply #7 on: January 20, 2019, 11:14:06 pm »
Hi

when i use this code on header.php the menu show VERTICAL - What i have to add or change that it SHOWS horizontal ?
(If it show something like osclasswizards will be great.)