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 »

Remove link for main page in page menu


  #1  
Old Mar 30, 2009, 01:27 PM
Charlotte
 
7 posts · Feb 2009
Hi Flynn.

Im almost done with my website using Atahualpa - so far so good .

I have a page menu with a lot of subpages to each main page, that appears when hovering the main page in the menu. Working great... But, now the users can click the main page, because it is a page - but I have nothing to show in these main pages. And I cannot hide the page, since it is the header of the subpages. So, what do I do? Is it possible to "remove" the link in main pages in the menu, so it is just like headers with same functions with hover and opening the list of the sub pages. Hoping Im making my self clear - and it is possible just an easy question. I haven't just been able to find the answer

Thanks in advance for your always great help.

Charlotte
  #2  
Old Mar 30, 2009, 07:31 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
In functions/bfa_hor_pages.php, replace line 4

PHP Code:
$list_pages_string preg_replace("/<li class=\"(.*?)\n<ul>/i","<li class=\"rMenu-expand \\1\n <ul class=\"rMenu-ver\">",$list_pages_string); 
with

PHP Code:
$list_pages_string preg_replace("/<li class=\"(.*?)><a href=\"(.*?)\"(.*?)\n<ul>/i","<li class=\"rMenu-expand \\1><a href=\"#\" onclick=\"return false\"\\3\n <ul class=\"rMenu-ver\">",$list_pages_string); 
  #3  
Old Mar 30, 2009, 10:39 PM
islandgolf858
 
3 posts · Mar 2009
Where exactly is this PHP file that you're referencing? Thanks!
  #4  
Old Mar 31, 2009, 07:32 AM
Shepherd Jim's Avatar
Shepherd Jim
 
301 posts · Feb 2009
Bristol, midcoast Maine USA
Quote:
Originally Posted by Charlotte
...<snip>
I have a page menu with a lot of subpages to each main page, that appears when hovering the main page in the menu. Working great... But, now the users can click the main page, because it is a page - but I have nothing to show in these main pages. And I cannot hide the page, since it is the header of the subpages. ...<snip>
Hey Charlotte! I actually started a poll a little while ago asking people how they felt the dropdown menus should work http://forum.bytesforall.com/showthread.php?t=757 --

Unfortunately it doesn't seem like forum visitors are keen about polls.

As I wander the internets I've been trying to take note of how people set up their menus. As long as it's done BOTH ways, my conclusion is that doing it the way you want is the safest. If people don't think to click on your top page because they think it's just a "header" they'll miss that page altogether.

Flynn? Is this an option that could be offered in the Atahualpa options. Turning on or off what shows on the menu bar -- making it either a link to a page (or category?) or just a "header" with the pages listed below on hover?
  #5  
Old Mar 31, 2009, 09:59 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
I already included the solution from above for the page menu bar as an option in the next version and will add the option for the category menu bar as well.
  #6  
Old Mar 31, 2009, 10:01 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
Quote:
Originally Posted by islandgolf858
Where exactly is this PHP file that you're referencing? Thanks!
/wp-content/themes/atahualpa331/functions/bfa_hor_pages.php

atahualpa331 might be atahualpa or atahualpa3, it doesn't matter
  #7  
Old Mar 31, 2009, 10:11 AM
Charlotte
 
7 posts · Feb 2009
Hi Flynn.

Thanks for the quick reply.

Well, it looked pretty easy, but it didn't work.

I changed line 4 in the file, but it is still clickable and the page opens.

My line 4 is not identically with yours. It has [0-9] in the line and the ("rMenu-expand\\1 etc) in yours says ("rMenu-expand\\2 etc) in mine.

Here is the line 4 code in my bfa_hor_pages.php

PHP Code:
$list_pages_string preg_replace("/<li class=\"(page_item|page_item page-item-[0-9]+)(.*?)\n<ul>/i","<li class=\"rMenu-expand\\2\n <ul class=\"rMenu-ver\">",$list_pages_string); 
After line 4, there are many lines with almost identical code as in line 4...

???
Kind regards,
Charlotte
  #8  
Old Mar 31, 2009, 10:19 AM
Charlotte
 
7 posts · Feb 2009
Quote:
Originally Posted by Shepherd Jim
Hey Charlotte! I actually started a poll a little while ago asking people how they felt the dropdown menus should work http://forum.bytesforall.com/showthread.php?t=757 --

Unfortunately it doesn't seem like forum visitors are keen about polls.

As I wander the internets I've been trying to take note of how people set up their menus. As long as it's done BOTH ways, my conclusion is that doing it the way you want is the safest. If people don't think to click on your top page because they think it's just a "header" they'll miss that page altogether.

Flynn? Is this an option that could be offered in the Atahualpa options. Turning on or off what shows on the menu bar -- making it either a link to a page (or category?) or just a "header" with the pages listed below on hover?

Hi Jim.

I totally agree with you... 1. Polls - narh, we just want to have the solution to our question as fast as possible . Well, I think we are in a time where we by a few clicks need the answer and everything else is being spammed, instead of spending a little time helping out with filling in questionforms and polls. 2. The header menus - I never click on them, except if I cannot find the stuff I need in a subpage from the drop down.

And sorry for the poor English - Danish is my language

Kind regards,
Charlotte
  #9  
Old Mar 31, 2009, 07:16 PM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
What's your Atahualpa version?

BTW this is integrated as a theme option in Atahualpa 3.3.2 http://wordpress.bytesforall.com/?p=70

You can try to use the bfa_theme_options.php and bfa_hor_pages.php of 3.3.2 with your 3.x version
  #10  
Old Apr 1, 2009, 12:24 AM
Charlotte
 
7 posts · Feb 2009
Hi Flynn.

Im using Atahualpa version 3.1.8... I did see that new versions had arrived, but I was almost done with all the detail design and a lot of messing around, so I did'nt have the strengh to change...

So, when you say:
"You can try to use the bfa_theme_options.php and bfa_hor_pages.php of 3.3.2 with your 3.x version". Do you then mean "download the 3.3.2 and copy bfa_theme_options.php and bfa_hor_pages.php into and then overwrite my bfa_theme_options.php and bfa_hor_pages.php in my 3.1.8 version?"

Will this give a new option in the theme settings - or do I overwrite the line 4 in the new files?

BR,
Charlotte
  #11  
Old Apr 1, 2009, 12:35 AM
Flynn's Avatar
Flynn
 
3,768 posts · Oct 2008
Munich, Germany
It should add the option. You would then have to enable the option at A. Theme Options -> Page Menu Bar, it's disabled by default.

Keep a copy of your old bfa_theme_options.php and bfa_hor_pages.php though if you try this.
  #12  
Old Apr 1, 2009, 12:13 PM
Charlotte
 
7 posts · Feb 2009
Hi Flynn.

Well, it seemed to be a great idea.... But, it didn't work . I did get the option in page menu called "Don't link first level parent items in Page" - and I changed it to "Yes". Saving and updating, but nothing happened at my site, still clickable and the main page appears when clicking.

Do I need to change anything else?

/Charlotte

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Page tab height issue: page link tabs higher than page menu bar Fux Page & Category Menu Bars 13 Oct 30, 2010 04:42 AM
[SOLVED] Don't show sub-pages for a main page on my menu bar jockoe Atahualpa 3 Wordpress theme 1 Jul 13, 2009 01:28 PM
How do I add an icon to a page menu link in page menu bar? bcorrigan Page & Category Menu Bars 9 Apr 6, 2009 03:35 PM
formatting (adding space) to main page menu viewdesigninc Page & Category Menu Bars 1 Mar 31, 2009 07:38 PM
Keep the name on the Page Menu Bar, remove the name on the page jockoe Page & Category Menu Bars 5 Mar 23, 2009 11:02 PM


All times are GMT -6. The time now is 09:03 PM.


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