I got a query today that one of my client wasn't able to enter the theme's options page as it gave error when he tried to goto theme options page. The error said:
You do not have sufficient permissions to access this page.
Pretty simple! yet too confusing initially. Why the hell do i don't have the permission to access that page man? well because that page don't exist infact! atleast not as what we expect it to be.
The theme name was Landpage theme by After10 that my client got in some frank kern list control course. The
fancy theme was getting on his nerves as you can expect!
Well he tried upgrading the wordpress, then tried installing wordpress multiuser (don't know what he was thinking and installed wp mu! ) but still no benefit! so there was me to get in to help :p After trying to reinstall wp on his server and installing this theme, i still got this error! so the error was probably from the theme ofcourse!
Why did i reinstall wordpress? because this error can also occur if wordpress files are not properly copied to the server or if you try to upgrade old version of wordpress to new one and it don't go through properly. So just to rule out this possibility i installed a fresh test wordpress installation.
Anyway… ok ok! i am coming to the point! so how did i fix this error? simple man! goto the theme folder:
/<wp root>/wp-content/themes/landingpage/
Look for the file named
functions.php
In the functions.php file, look for the code (near line 437):
add_options_page("Landing Page Options", "Landing Page Options", 1, "Landing Page Options", "flowerstore_admin");and change this code to:
add_options_page("LandingPageOptions", "LandingPageOptions", 1, "LandingPageOptions", "flowerstore_admin");Actually what we did is we removed spaces between Landing Page Options. Why we did it? simply because it was causing the error :D
Hold on! there is one more place to edit! (i don't know if it's really important, but it should be too!)
Look for the code (near line 447):
var message = '<p>This <strong>After10</strong> comes with a <a href="<?php echo admin_url('options-general.php?page=Landing Page Options'); ?>">comprehensive options panel</a>.</p>';and replace this one too with:
var message = '<p>This <strong>After10</strong> comes with a <a href="<?php echo admin_url('options-general.php?page=LandingPageOptions'); ?>">comprehensive options panel</a>.</p>';And here too we basically changed Landing Page Options to LandingPageOptions. Why? Oh comeon ! . . .
Save the page to make changes.
(it's better to save the old code by making backup of the file itself before editing, or else by copying the line of code and commenting one of it and editing the other one, so that the original code is still there with you but be careful with it)
Now goto your wordpress admin panel (dashboard) and click on the LandingPageOptions again at the bottom of the page and voila! no more error and you can see the admin page for the Landing page theme for wordpress by after10 (using wordpress 3.0)
If you still have issue with this and want my assistance to do it for you like i did for the client, do let me know. In other case, you can also ask for the edited version of functions.php to just copy and replace over your old errornous functions.php file of your landingpage theme.
If you need similar assistance with any other theme too, do let me know!
{ 34 comments… read them below or add one }
I had the same problem…this worked. thanks much.
were you using the same theme ??
yes, landing page theme from Kern.
that’s great
thanks…
had a problem with a plugin this solved it
you’re welcome remy
Hi.
I have the same problem you described. I did what you said and now everything is ruined. Not only did it said… “Parse error: syntax error, unexpected $end in /home2/stoppadi/public_html/blogg/wp-content/themes/landingpage/functions.php on line 456″… when I did the changes. I can’t even upload the old zipfile (that isn’t changed) without the same error text comes up. How come it worked for others and not me?
Perhaps I did something wrong… I extracted the zipfile and a document was created with all the files in it. Then I looked up functions.php. I opend it in dreamweaver and did the canges you said. (I saved the original functions.php). the I created a new zipfile by right clickling on the document and choosing add to zipfile. Then I uploaded that zipfile. and it didn’t work.
Could you please tell me what I did wrong… now I can’t even use the theme…
Thanks!
you need to edit the php file, not the zip one, zip one was for backup
Hi again.
Don’t bother with my earlier comment… I have fixed my problem. I misunderstood you. Now I think I get it.
Thanks
oh ok! I am glad that you fixed it. Can you mention what you were doing wrong to help others who may face similar issue.
I just didn’t understand that I should do the changes in my bluehost account. I thought I had to unzip the file and change the functions.php on my computer and then create a new zipfile to upload in my wordpress.
I’m new to this.
Thanks again!
ohk.. you’re welcome :)
Hey Nabeel,
Looks like I’m getting the error:
Parse error: syntax error, unexpected $end in /home/mendbrokenheart/mend-broken-heart.com/blog/wp-content/themes/landingpage/functions.php on line 456
435
444
These were the lines for the two codes to change. Please let me know what you think the problem is.
I changed the PHP file on my computer and uploaded via FTP to the server.
After following the instructions. I do have wordpress 3.0, it upgraded automatically, do you think this might be the cause?
My lines of code were also different by a few numbers,
i didn’t receive the code in comment, can you use [ code ] [ / code ] tags around it please?
probably you replaced partial code (some times line of code is continued to 2 lines in some editors, please read the article to replace the exact code with the provided one)
or else if you want my service to fix it for you let me know
I’m Excellent article.I decide to put it to use one of these for you days.Thank this.To sharing your success!
Awesome – this worked for me too. Thanks so much.
you’re welcome
I was having the SAME problem and it worked first try. Thank you for posting this and thank you to David G from List Control for posting the link!
Cheers!
you’re welcome. Can i know the address of the website which links here? Thanks.
No problem, it’s the membership only site for Frank Kern’s List Control:
http://www.listcontrolsite.com/posts/google-content-network—video-1—the-fancy-blog#comment_39641
Thanks again!
Kevin
ahan,thanks!
Kick ass! Fixed worked like a charm and saved me a bunch of time.
Thanks!
Glad to know that! you’re welcome
dude that was a lifesaver. I was fixing to redo my entire blog LOL
Thanks man!
you’re welcome James
Thank you so much for sharing that fix – it has been driving me nuts! Now all I need to do is figure out why the South Africa Sociable plugin is doing the same thing!
if you want my service to fix that plugin for you, please let me know.
You are the King. Thanks great info. I was going to look throught the php file but you came to the rescue and saved me a few hours. THANKS
you’re welcome!
Thanks!
you’re welcome Geoff
Awesome dude!! Worked perfectly, You da man!! :)
consider making a donation? ;)