Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Page & Category Menu Bars (http://forum.bytesforall.com/forumdisplay.php?f=10)
-   -   Remove link for main page in page menu (http://forum.bytesforall.com/showthread.php?t=1018)

Charlotte Mar 30, 2009 12:27 PM

Remove link for main page in page menu
 
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

Flynn Mar 30, 2009 06:31 PM

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); 


islandgolf858 Mar 30, 2009 09:39 PM

Where exactly is this PHP file that you're referencing? Thanks!

Shepherd Jim Mar 31, 2009 06:32 AM

Quote:

Originally Posted by Charlotte (Post 3825)
...<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?

Flynn Mar 31, 2009 08:59 AM

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.

Flynn Mar 31, 2009 09:01 AM

Quote:

Originally Posted by islandgolf858 (Post 3872)
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

Charlotte Mar 31, 2009 09:11 AM

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 :confused:

Charlotte Mar 31, 2009 09:19 AM

Quote:

Originally Posted by Shepherd Jim (Post 3890)
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

Flynn Mar 31, 2009 06:16 PM

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

Charlotte Mar 31, 2009 11:24 PM

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

Flynn Mar 31, 2009 11:35 PM

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.

Charlotte Apr 1, 2009 11:13 AM

Hi Flynn.

Well, it seemed to be a great idea.... But, it didn't work :confused:. 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


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

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