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 »

[SOLVED] Menu bar has duplicate specification of attribute "class"


  #1  
Old Jul 28, 2010, 06:20 AM
hollidaysjohn
 
16 posts · May 2010
Cambridge, UK
I'm getting an error when I validate the html. Using 3.5.3 and WP 3.0 and the WP menu system.

On a menu box when the sub-menu indicator arrows appear to show there is a submenu, I get the follow error from the W3 validator:

Quote:
duplicate specification of attribute "class"
<li class="rMenu-expand menu-item-1008" class="menu-item menu-item-type-post_type">
Is that the preg_replace function in bfa_hor_pages.php?
  #2  
Old Jul 28, 2010, 06:49 AM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I get HTML validation errors whether the "fix" is in or out but I also don't care too much about HTML validation. Go to any site and you will find HTML "errors".
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Aug 22, 2010, 04:25 PM
ganphx
 
2 posts · Aug 2010
There is no guarantee that any browser would honor or use the second coded class.

The preg_replaces are incorrect in functions/bfa_new_wp3_menus.php:

Old Code:

Code:
	$newmenu = preg_replace("/<li id=\"(.*?)\n<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n <ul class=\"rMenu-ver sub-menu\">",$newmenu);
	$newmenu = preg_replace("/<li id=\"(.*?)\n\t<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n\t <ul class=\"rMenu-ver sub-menu\">",$newmenu);
	$newmenu = preg_replace("/<li id=\"(.*?)\n\t\t<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n\t\t <ul class=\"rMenu-ver sub-menu\">",$newmenu);
	$newmenu = preg_replace("/<li id=\"(.*?)\n\t\t\t<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n\t\t\t <ul class=\"rMenu-ver sub-menu\">",$newmenu);
	$newmenu = preg_replace("/<li id=\"(.*?)\n\t\t\t\t<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n\t\t\t\t <ul class=\"rMenu-ver sub-menu\">",$newmenu);
	$newmenu = preg_replace("/<li id=\"(.*?)\n\t\t\t\t\t<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t <ul class=\"rMenu-ver sub-menu\">",$newmenu);
	$newmenu = preg_replace("/<li id=\"(.*?)\n\t\t\t\t\t\t<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t\t <ul class=\"rMenu-ver sub-menu\">",$newmenu);
	$newmenu = preg_replace("/<li id=\"(.*?)\n\t\t\t\t\t\t\t<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t\t\t <ul class=\"rMenu-ver sub-menu\">",$newmenu);
	$newmenu = preg_replace("/<li id=\"(.*?)\n\t\t\t\t\t\t\t\t<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t\t\t\t <ul class=\"rMenu-ver sub-menu\">",$newmenu);
	$newmenu = preg_replace("/<li id=\"(.*?)\n\t\t\t\t\t\t\t\t\t<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\1\n\t\t\t\t\t\t\t\t\t <ul class=\"rMenu-ver sub-menu\">",$newmenu);
New Code:

Code:
	$newmenu = preg_replace("/<li id=\"(.*)\" class=\"(.*?)\">(.*)\n(.*)<ul class=\"sub-menu\">/i","<li class=\"rMenu-expand \\2\">\\3\n<ul class=\"rMenu-ver sub-menu\">",$newmenu);
  #4  
Old Aug 23, 2010, 06:05 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
see http://forum.bytesforall.com/showthread.php?t=8756
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Aug 23, 2010, 11:45 AM
ganphx
 
2 posts · Aug 2010
Thanks for the link...bugfix worked!

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't figure out how to add code to display in <div class="opacityright"> schabadoo Header configuration & styling 3 May 24, 2010 05:40 AM
[SOLVED] &quot;class&quot; appearing above header and navbar DesignFlute Header configuration & styling 6 May 7, 2010 12:50 PM
Something to make you go "Hmmmm"! Page menu bar not centered!! Masselyn Page & Category Menu Bars 0 Jan 30, 2010 08:13 PM
Need to call <li class= "current-cat-parent"> for single posts b1tzmast3r Page & Category Menu Bars 5 Jan 25, 2010 02:48 PM
Background color "sub-pages" and "whole menu bar" gxxfy Page & Category Menu Bars 1 Nov 24, 2009 02:46 AM


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


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