How to Fix “Use of undefined constant OP_SN” Notification

How to Fix “Use of undefined constant OP_SN” Notification

If you are using an Optimize Press plugin, then you might have encountered this notification error:

Notice: Use of undefined constant OP_SN - assumed 'OP_SN' in ... /wp-content/plugins/optimizePressPlugin/lib/framework.php on line 494

Notice: Use of undefined constant OP_SN - assumed 'OP_SN' in ... /wp-content/plugins/optimizePressPlugin/lib/framework.php on line 495

This happens if you your WordPress wp-config.php file debug is set to True. I first noticed this notification when my websites upgraded to 4.0 version, and it was very annoying to have this error appearing in the front end of your website.

The solution though is very simple. Just login to your cpanel, locat wp-config.php and look for this line:

 define( 'WP_DEBUG', true ); 

Simply change the “true” to “false”, then click save. That should take out that error line.

Do you have any other solution? Share it below.

How to Add New Widget Area in Genesis

How to Add New Widget Area in Genesis

One of the best things that you can get with Studiopress’ Genesis Framework is its flexibility to add new widget area. This kind of flexibility has become a lot easier compared few years ago when Genesis Framework is just starting up. There are some other ways in adding new widget areas if you are using other themes but unlike Genesis, they often use another set of plugin.

In Genesis however, we don’t have to add another plugin. All we need to do is to add a few codes. The first code that we need to add in functions.php of your child theme is this:

genesis_register_sidebar( array(
'id' => 'beforefooter-widget',
'name' => __( 'Custom Widget', 'genesis' ),
'description' => __( 'Custom Widget Area', 'childtheme' ),
) );

This code will register a new widget. Please take note of the following labels:

id = You will have to remember this one because this will be your call id.

name = This is the name that widget.

description = You need this so that you will be able to identify where your code is located.

The second code that you will have to install is where you will want the widgetized area to appear. You will have to be familiar with Genesis hooks location so that you will be able to identify the right call sign. So if you are not familiar with the Genesis hooks, no problem. Just refer in this Genesis visual hook guide. The code is:

add_action( 'genesis_before_footer', 'add_genesis_widget_area' );
function add_genesis_widget_area() {
                genesis_widget_area( 'beforefooter-widget', array(
		'before' => '
‘, ‘after’ => ‘

‘, ) ); }

Please take note that “genesis_before_footer” is the hook. And you can refer to other hooks in the visual hook guide where you want it to appear. In this example, I prefer that it will appear before the the footer.

Now, the third code that we will have to know is the CSS. Please take note of the “id”

//* CSS

.beforefooter-widget {
     background-color: #fff;
     border-top: 1px solid #ececec;
     color: #999;
     clear: both;
     padding: 60px 0 36px;
}

Again, if you are familiar with CSS styling, this will be far more useful to you. The above CSS is what I have used for this example. Feel free to modify it if you want.

Have you ever used Genesis? Share your thoughts below.

3 Ways To Enhance Your Contact Form 7

3 Ways To Enhance Your Contact Form 7

If you are in a tight budget and is looking for a free effective contact form for your WordPress, Contact Form 7 plugin may be the answer to your needs. It’s very simple and intuitive to use. However, to effectively use it with security, here are some ways to enhance your Contact Form 7:

1. Install Really Simple Captcha. This is another plugin that can be integrated with Contact form 7. All you have to do is to activate the plugin. When you start making your contact form, just click “Generate Tag” and click “Captcha”.

2. Install Contact Form 7 Honeypot. It’s a simple non-invasive SPAM protection. Here’s a short video about Honey Pot

3. Optional but can be helpful, install Contact Form 7 Integrations – If you are using CF7 in a professional site, and you need some integration for 3rd party tools, this plugin can be a big help. It integrate Mailchimp, Zendesk, Google Doc, Constant contact, etc.

Do you have any other way in enhancing your Contact Form 7?  Share it below.

How to Add Codes In Header and Footer in WordPress

How to Add Codes In Header and Footer in WordPress

Most themes and frameworks these days have their own way of adding various codes like Google Analytics, Google Adwords, and other tracking codes like that of Facebook. So why in the world do you need another plugin to add this code?

The answer is very simple. First, not all themes and frameworks have that feature. So it means that in some themes, there is really a need for you to add a plugin that add codes in header and footer in WordPress site.  Secondly, if you want to go to the path of non-theme dependent for this kind of feature, then better to add a plugin like this.

The question is what is the plugin to use to achieve this? In my investigation, there are two choice plugins to use. The first one is the Insert Headers and Footers plugin. This is made by the WPBeginner. If all you have to do is to add the code applicable for all the pages, then this plugin is already enough.

But what if you will need to add another code for specific pages? This is needed to measure conversion like Google Adword conversion and remarketing code, or Facebook remarketing code. The plugin OH Header Footer can be a good answer to do this. It does not only give you opportunity to add javascript, but it also give you the advantage of adding CSS code.

Do you know any other plugin that allows you to add a code to header and footer? Share it below.