Jump to content
php.lv forumi

Wordpress menu


martinsdudeks

Recommended Posts

Sveiki,velejos paintereseties par vienu lietu , lieta sekojosa, wordpress menu, lieta tada kad izveidojot lapas viss darbojas ideali,bet saja gadijuma man ir vajadzigs pievienot pie menu attiecigu lapu ar attiecigu noradi ta ir ''/archives/categories/people'' bet es to nevaru izdarit,caur worpress admina paneli

 

<div id="menu"><ul><ul> 

<li><a href="<?php echo get_option('home'); ?>" accesskey="1" <?php if( is_home()) : ?> class="active" <?php endif; ?> title="">HOMEPAGE</a></li>

<?php
                       if( is_page() ) $curpage = $post->ID;
		$pages = get_pages('sort_column=menu_order');
		foreach( $pages as $page ) {
	        $this_css = '';
	        $this_link = get_page_link($page->ID);
		if( $curpage == $page->ID ) $this_css = ' class="active"';
		echo "<li><a $this_css href=\"$this_link\">" . $page->post_title . "</a></li>\n\t\t";} 
?>

</ul></ul></div>

 

sads ir kods,bet nespeju saprast ka lai pievieno vel atsevisku pogu ar nosauku PORTFOLIO kas taisna cela aizved uz vajadzigo noradi un darbojas ari ka current.

 

ceru uz jusu atsaucibu!

Link to comment
Share on other sites

bet es to nevaru izdarit,caur worpress admina paneli

 

Vari gan!

Custom links!

 

Pie tam, WTF?!?!

<ul><ul>

 

 

Un kāpēc lieto ko šādu? Wordpress pats tak piedāvā uzstādīt HOMEPAGE!

<li><a href="<?php echo get_option('home'); ?>" accesskey="1" <?php if( is_home()) : ?> class="active" <?php endif; ?> title="">HOMEPAGE</a></li>

Edited by edw
Link to comment
Share on other sites

Ja,es zinu kad wordpress piedava uzstadit sakuma lapu,bet saubos vai es varu uzstadit index.php failu ka sakuma lapu caur admina paneli,ka redz ivins piedava tikai uzlikt par sakuma lapu izvedotas lapas,mana gadijuma ta ir tikai viena jo esmu izveidojis tikai vienu MANS LAPAS LINKS un veidojot caur custom menu kadu linku vins nepievienojas pie navigacijas neuzradas vienkarsi!

 

<li><a href="<?php echo get_option('home'); ?>" accesskey="1" <?php if( is_home()) : ?> class="active" <?php endif; ?> title="">HOMEPAGE</a></li>

 

so es lietoju tadel lai uzstaditu galveno lapu tas ir index.php , par current lapu,ka esoso!

Edited by martinsdudeks
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...