Osclass forums

Development => Themes => Topic started by: Ermitage on May 27, 2013, 12:20:23 am

Title: Static page in the Header menu
Post by: Ermitage 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?
Title: Re: Static page in the Header menu
Post by: Ermitage on May 28, 2013, 12:18:24 am
nobody can help me? :'(
Title: Re: Static page in the Header menu
Post by: Ermitage on June 04, 2013, 01:17:54 am
Please anybody can help me!!!!   :'( :'(
Title: Re: Static page in the Header menu
Post by: Cherry on August 08, 2013, 02:09:22 am
Did you solve this problem?
Title: Re: Static page in the Header menu
Post by: frosticek 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.
Title: Re: Static page in the Header menu
Post by: Janmejay on February 23, 2015, 02:18:55 pm
Move the <?php osc_reset_static_pages(); ?> below while loop. Cheers!
Title: Re: Static page in the Header menu
Post by: evrensel 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
Title: Re: Static page in the Header menu
Post by: omid_firoznia 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.)