Code in head of Genesis WP for particular page

Occasionally we all need to place some piece of code in header.php but to show up just on some page, not on all of them. Not needed to be custom page, but maybe you need it just on home page or just to one category, etc.
In usual themes that’s easy. You make page-2.php if 2 is ID of that page, and then you call not header but header(home) for instance, and make new header-home.php with that code.

But if you are using Genesis theme, this can be difficult. So in that case, easiest way would be to copy header.php from genesis theme, and paste it to child theme. Then open that file and edit. Before closing header tag, just add this:

[codesyntax lang=”php”]

echo '
<script type="text/javascript">
your code


In this example, ID of desired page is 2, so you should change number in is_page(‘2’) with your page ID.
Also, example is for javascript, but you can add anything you need.

You do not have sufficient permissions to access this page

If you run a wordpress website and you transfered it to another server/hosting, or made some other significant change, when you try to loggin to WP as administrator, you might get this message:
You do not have sufficient permissions to access this page.

There are several solutions on net I have found, but none of them helped me untill I figured out different issue.

For some, this issue happened because of wrong table prefix in MySQL for some of the columns. So check wp-config file table prefix (usually wp_) and compare it to table prefixes in MySQL database.

Others resolved this with wp_capabilities in wp_usermeta. It should be a:1:{s:13:”administrator”;s:1:”1″;}
Althought in one of my MySQL’s it’s a:1:{s:13:”administrator”;b:1;} and it works fine.

Anyway, after trying that two solutions, I did something that I though might caused problem and yes, I managed to login. In MySQL, look at wp_users. User I tried to login with had ID 6 and ID 5 was missing. I have no idea how that happened but just change ID so all user ID’s goes one by one, fill skipped ID if there is some. I changed #6 to #5 and just that simple thing resolved my issue.

Don't have sufficient permissions to access this page

Contact Form 7 Submit doesn’t work: SyntaxError: JSON.parse

I experienced situation with Contact Form 7 on one WordPress website recently, when submit button didn’t want to work at all. Spinning circle didn’t appeared, not any message (error or succesfuly sent) email wasn’t sent, nothing. On click to Submit button just notning happened.
When I opened Developer Tools Console in Chrome browser, I got this error message:
JSON.parse: unexpected non-whitespace character after JSON data at line X column X of the JSON data

Continue reading Contact Form 7 Submit doesn’t work: SyntaxError: JSON.parse