Strikethrough over price in WPBakery page builder

WPBakery page builder is quite popular for editing wordpress websites. You can use elements and design pages and posts easier with just a bit or even without knowing to code. But here is situation I found myself in recently while I was editing one client’s website.

They used “Price” element on pricing page. It all worked well untill they wanted to place old price with strigethrough line over, and new price next to it. The “price” element just don’t have that function. So I figured out small trick for it.

Continue reading Strikethrough over price in WPBakery page builder

Change site URL in MySQL PHPmyadmin

If you have WordPress website that used all absolute URL’s instead of relive ones, and you want to change all in MySQL, here is the way how you can do that in PHPmyadmin. It will be a bit complicated search and replace procedure.

First go to Search tab, enter your old URL, select all tables in “Inside tables” and click “Go”.

search mysql in phpmyadmin Continue reading Change site URL in MySQL PHPmyadmin

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”]

<?php
if(is_page('2')){
echo '
<script type="text/javascript">
your code
</script>
';
}
?>

[/codesyntax]

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