You do not have sufficient permissions to access this page – landingpage theme for wordpress by after10

by Nabeel on June 21, 2010

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!

You might also like

{ 34 comments… read them below or add one }

Sara June 24, 2010 at 5:00 am

I had the same problem…this worked. thanks much.

Reply

Nabeel June 24, 2010 at 5:04 am

were you using the same theme ??

Reply

sara August 2, 2010 at 9:18 pm

yes, landing page theme from Kern.

Reply

Nabeel August 2, 2010 at 9:33 pm

that’s great

Reply

remy June 26, 2010 at 6:51 pm

thanks…
had a problem with a plugin this solved it

Reply

Nabeel June 26, 2010 at 10:58 pm

you’re welcome remy

Reply

Linus June 26, 2010 at 8:15 pm

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!

Reply

Nabeel June 26, 2010 at 10:44 pm

you need to edit the php file, not the zip one, zip one was for backup

Reply

Linus June 26, 2010 at 10:11 pm

Hi again.
Don’t bother with my earlier comment… I have fixed my problem. I misunderstood you. Now I think I get it.

Thanks

Reply

Nabeel June 26, 2010 at 10:45 pm

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.

Reply

Linus June 27, 2010 at 4:21 am

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!

Reply

Nabeel June 27, 2010 at 7:59 am

ohk.. you’re welcome :)

Reply

Bobby June 28, 2010 at 3:00 am

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,

Reply

Nabeel June 28, 2010 at 5:42 am

i didn’t receive the code in comment, can you use [ code ] [ / code ] tags around it please?

Reply

Nabeel June 28, 2010 at 5:45 am

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

Reply

Derrick Stapler June 29, 2010 at 8:08 am

I’m Excellent article.I decide to put it to use one of these for you days.Thank this.To sharing your success!

Reply

ingilizce ian August 1, 2010 at 6:53 pm

Awesome – this worked for me too. Thanks so much.

Reply

Nabeel August 1, 2010 at 10:16 pm

you’re welcome

Reply

Kevin August 8, 2010 at 1:29 pm

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!

Reply

Nabeel August 8, 2010 at 5:44 pm

you’re welcome. Can i know the address of the website which links here? Thanks.

Reply

Kevin August 8, 2010 at 10:13 pm

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

Reply

Nabeel August 8, 2010 at 11:37 pm

ahan,thanks!

Reply

CTRtard August 11, 2010 at 8:11 am

Kick ass! Fixed worked like a charm and saved me a bunch of time.

Thanks!

Reply

Nabeel August 20, 2010 at 8:33 pm

Glad to know that! you’re welcome

Reply

james August 16, 2010 at 7:42 am

dude that was a lifesaver. I was fixing to redo my entire blog LOL

Thanks man!

Reply

Nabeel August 28, 2010 at 3:28 am

you’re welcome James

Reply

Rachel Mathews August 19, 2010 at 3:01 am

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!

Reply

Nabeel August 19, 2010 at 10:03 am

if you want my service to fix that plugin for you, please let me know.

Reply

Sammi August 22, 2010 at 4:47 pm

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

Reply

Nabeel August 23, 2010 at 12:50 am

you’re welcome!

Reply

geoff August 27, 2010 at 3:29 am

Thanks!

Reply

Nabeel September 2, 2010 at 5:44 am

you’re welcome Geoff

Reply

Kris September 3, 2010 at 8:53 pm

Awesome dude!! Worked perfectly, You da man!! :)

Reply

Nabeel September 3, 2010 at 11:16 pm

consider making a donation? ;)

Reply

Leave a Comment

Please wrap all source codes with [code][/code] tags.

 

Previous post:

Next post: