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!
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? ;)
Hey Nabeel!!
Thanks sooo much man!!!
You saved me a bunch of time and effort.
You are the BEST!
Thanks a lot.
James
you’re welcome James!
Thank you for the Frank Kern fix. Was a big help to me.
Nabeel,
I had a client who just installed the theme, and had this issue. Your fix worked excellently!
I am wondering if you could perhaps point me in the right direction. He wants to add a custom field to the form (it has 4, he needs 5…Isn’t it always that way?) So, I have a 2-fold question…
1) is there a way to add a hidden field/value pair
2) Can I include php code in the value section (it populates the form with a SESSION variable)
If you could point me where I could find these answers, that would be excellent!
Thanks Nabeel!
John
In most cases you just need to copy paste the old fieldname containing parts of code, just replacing the name of the field.
Actually, never mind my comment. I found the places in the functions.php file to add fields. There are about 5 places the changes need to be made in order to add custom fields.
Thanks for the great post again!
John
you’re welcome John!
Hi, I am having same problem with Mandigo theme.
I can’t find similar code line like the ones you talked about in LandingPage theme.
My problem is, I cannot go to “theme options” at all.
It gave me the exact same error as you said about this Landing Page theme.
I can help you fix it Aleczan, Please let me know if you want my services to fix it for you.
Hello Nabeel. I use mailchimp and need to know if it is possible to edit the code for the landingpage theme to work with MC. By default it works with Aweber. Thanks for your consideration :-)
do you want my services to do it for you?
Yes Nabeel. I’d like to, so I need a quote. Thanks again.
check your email John
thanks nabeel
you’re welcome, please respond to the email
Hi Nabeel,
I found you through a link of the frank kern website,
Having the same issue as everyone else.
Im a little confused when you say
“goto the theme folder:
//wp-content/themes/landingpage/
Where abouts is this theme folder? is this in the word press admin page? my hosting account? Am I accessing this through safari or is it on my hard drive somewhere?
Thanks for the help
Hi Nabeel,
Im a little confused when you say:
goto the theme folder:
//wp-content/themes/landingpage/
where is this theme folder? do I access it through the word press admin page? or my hosting account (im with blue hosting)
or are you refering to something on my hard drive?
Many thanks
it’s referring to your server
Please note, don’t try it if you are not sure what it is and how to do it. Let me know if you want me to do it for your!
Thanks Nabeel, got it working!
thats great :)
This has saved me. Thank you very much Nabeel.
Nandri~
Glad to know that! :)
Hi,
thanks a lot for your tutorial. It helped me solve the isse, but now I have another problem with it. When I want to upload another logo or background image it says the following
“Warning: move_uploaded_file(../wp-content/themes/landingpage/images/custombg/foodbg.jpg) [function.move-uploaded-file]: failed to open stream: No such file or directory in /home5/bauchfet/public_html/wp-content/themes/07 – Landing Page/functions.php on line 264
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move ‘/var/tmp/phpLJvKB5’ to ‘../wp-content/themes/landingpage/images/custombg/foodbg.jpg’ in /home5/bauchfet/public_html/wp-content/themes/07 – Landing Page/functions.php on line 264”
Would be really cool if you could help me with that…thanks!
there is probably permissions issue with your directory. Please make the directory:
/wp-content/themes/landingpage/images/
and sub directories in it to have 755 permission
Hi,
thanks for your answer. I am afraid i dont get it :)
– I just took the theme and put it directly on my hard drive, then I zipped it again and uploaded it to wordpress, still doesnt work.
-Then I took the theme, put the new images in the image folder and zipped it again and uploaded the theme again, still doesnt work
Or do you meant something else?
thanks
yeah I meant something else
Do you want me to fix it for you?
Hi Nabeel, I have the same issue with Cashflow that the images cannot be uploaded. I have checked I have /wp-content/themes/landingpage/images/ and the image folder have 755 permission. Can you please help?
Thanks Joe
sure, please email me with your website name and logins so that I can check and discuss further at: [email protected]
Hi Nabeel, I have the same issue with Cashflow that the images cannot be uploaded. Can you please help?
Thanks Joe
please close your site. There is no perfect answer of this question
wow what a logic! if something don’t have a definite solution, then we should close our sites ? !