Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

Adding list items to the Page Menu


  #1  
Old Dec 19, 2008, 04:22 PM
bseppa
 
55 posts · Dec 2008
Flynn - I used to add list items to the Page Menu bar in version 2 of your theme by doing what you see below (I had an "openwindow" javascript method in header.php). Sometimes I wanted to link to an external page and have control over the window that opens. Is this at all possible in version 3?

Code:
<div class="clearfix" id="modernbricksmenu">
     <ul>
	<li class="page_item"><a href="<?php echo get_option('home'); ?>/" title="<?php bloginfo('name'); ?>">Home</a></li>
		<?php wp_list_pages('title_li=&depth=1' ); ?>
<li><a href="javascript:openwindow('http://www.url.com','','yes','no','20','20')">Photography</a></li>
		</ul>
</div>
I don't see a call to wp_list_pages, but I could be looking in the wrong place.

B
  #2  
Old Dec 19, 2008, 06:41 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
You can do this in functions/bfa_header_config.php

To add a page, add this:
PHP Code:
$page_menu_bar .= '<li><a href="link">Link Text</a></li>'
or, to add pages and sub pages, add this:

PHP Code:
$page_menu_bar .= '<li class="rMenu-expand"><a href="link">First Level A</a>';
$page_menu_bar .= '   <ul class="rMenu-ver">';
$page_menu_bar .= '   <li><a href="link">Second Level A</a></li>';
$page_menu_bar .= '   <li><a href="link">Second Level B</a></li>';
$page_menu_bar .= '   </ul>';
$page_menu_bar .= '</li>';
$page_menu_bar .= '<li><a href="link">First Level B</a></li>'
...after this code in line 12, if you want the new page links to appear on the left side of the menu bar (before the existing links):

PHP Code:
$page_menu_bar '<div id="menu1"><ul id="rmenu2" class="clearfix rMenu-hor rMenu">' "\n"
...or before this code in line 23, if you want your new page links to appear on the right side of the menu bar (after the existing menu links):

PHP Code:
$page_menu_bar .= '</ul></div>' "\n"
Finally, to make the new links open in a new window, add

PHP Code:
target="_blank" 
to each one of the new page links, like this:

PHP Code:
$page_menu_bar .= '<li><a target="_blank" href="link">Link Text</a></li>'
  #3  
Old Dec 20, 2008, 05:11 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
FIND this in line 23 in functions/bfa_header_config.php:

PHP Code:
$page_menu_bar .= '</ul></div>' "\n"


and ADD this right before it:

PHP Code:
$page_menu_bar .= '<li><a target="_blank" href="url.com">Photography</a></li>'


so that you end up with:

PHP Code:
$page_menu_bar .= '<li><a target="_blank" href="url.com">Photography</a></li>';
$page_menu_bar .= '</ul></div>' "\n"

  #4  
Old Jul 15, 2009, 03:03 PM
3ukman
 
22 posts · Jul 2009
I have a follow up question about this, I want the tab to point to a category page like this:

http://www.mysite.com/index.php/category/category1/

It works , but after clicking the tab it does not remainHIGHLIGHTED to show that it is the active section.

This only works with pages , doesnt it ?
  #5  
Old Jul 16, 2009, 07:36 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
The highlighting works if you let Wordpress create the <UL> list. If you add items manually, i.e. a link to a category to the page menu bar, you'd have to add the current state of the menu tab as well

<li class="cat-item<?php if ( is_category('Category Name') ) { echo ' current-cat'; } ?>">
<a href="link">Category Name</a></li>
  #6  
Old Jul 17, 2009, 04:10 AM
3ukman
 
22 posts · Jul 2009
Thanks Flynn,

I get unexpected T_STRING parsing error , could you please quickly verify the syntax for me ?
  #7  
Old Jul 21, 2009, 05:13 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
post the 3 lines above and below the line indicate in the error.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old Jul 23, 2009, 11:52 AM
3ukman
 
22 posts · Jul 2009
Thanks for all the help , I will hire developer for this one.
  #9  
Old Jul 23, 2009, 04:13 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
fyi, there is a bug in the category menus in ver 3.4.2- the selected page wouldn't remain highlighted in the menu bar. see http://forum.bytesforall.com/showthr...ghlight=bugfix for a fix
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #10  
Old May 4, 2010, 01:54 PM
mptorr
 
13 posts · Aug 2009
Is the method described by Flynn in post 3 still valid? The code in bfa_header_config seems to have changed a lot since then. Do you have an updated method to insert a link to external website on the pages menu?

Thanks.
  #11  
Old May 4, 2010, 02:37 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
No it's not valid, that post is almost a year and a half old. Do a forum search for 'external link' and you should find the method.

I'm closing this thread due to it's age
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Space between Widget List Items configurable? upscho Sidebars & Widgets 10 Jul 3, 2012 06:15 PM
[SOLVED] Bullets, Circles, Icons instead of left border on widget list items MacMacGA Sidebars & Widgets 62 Jul 30, 2010 12:46 PM
How to change the spacing of list items Webmason Atahualpa 3 Wordpress theme 5 Aug 4, 2009 03:33 PM
[SOLVED] How to add space between list items in post body? Alexi Atahualpa 3 Wordpress theme 2 Jun 25, 2009 07:02 PM
[SOLVED] Page Menu Bar - Strange Space Occurring Between Menu Items NealSchaffer Page & Category Menu Bars 2 Jun 20, 2009 11:18 AM


All times are GMT -6. The time now is 01:38 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.