Posts Tagged "wordpress"

Severe Vulnerability Exposes WordPress Websites To Attack

A serious WordPress helplessness which has been left a year without being fixed can possibly upset innumerable sites running the CMS, analysts guarantee. At the BSides specialized cybersecurity gathering in Manchester on Thursday, Secarma scientist Sam Thomas said the bug licenses assailants to abuse the WordPress PHP structure, bringing about a full framework bargain. On the off chance that the area allows the transfer of records, for example, picture designs, assailants can transfer a created thumbnail document so as to…

Read More

How to use WooCommerce’s default price at any custom template

To use WooCommerce’s price in your custom theme template open the template file and use the following code and see the magic. Example <?php global $post, $product; ?> <span itemprop=”price” class=”price”><?php echo $product->get_price_html(); ?></span> For default price template file of woocommerece you can look at folloiwng location yourtheme/woocommerce/loop/price.php. Open the file up and see the code used for the same <?php global $product; ?> <?php if ( $price_html = $product->get_price_html() ) : ?> <span class=”price”><?php echo $price_html; ?></span> <?php endif;…

Read More

How to use hooks (actions and filters) in wordpress and woocommerce

What are hooks? Hooks are helpful in WordPress which allow you to manipulate code without editing core files. It is used extensively used throughout WordPress and WooCommerce by developers. Two types of hook: actions and filters. Action Hooks allow you to insert custom code. Filter Hooks allow you to manipulate and return a variable. There are lot of excellent article on hooks and filters as follows: 1) https://codex.wordpress.org/Plugin_API 2) https://www.tipsandtricks-hq.com/wordpress-action-hooks-and-filter-hooks-an-introduction-4163 3) http://code.tutsplus.com/articles/the-beginners-guide-to-wordpress-actions-and-filters–wp-27373 4) http://blog.teamtreehouse.com/hooks-wordpress-actions-filters-examples Using hooks If you use a…

Read More

Steps To Follow When Updating WordPress

The WordPress upgrade system is improved itself from last version. However, there are some steps you can take care to ensure that your upgrades doesn’t affect anything. First and foremost, upgrades and updates should be done during your off hours i.e for off visit hours for your users. Usually this is at night, but it always depends on your site’s traffic. The key is to execute your update during a low activity time just in case something goes awry. Next,…

Read More

WordPress comment form validation

Copy and paste below and see the validation in working: <style type=”text/css”> .error { font-size: 12px; padding: 0 0 5px 0; color: #FF0000; } input.error, textarea.error { background: #FFD2D2; color:#000000; } </style> <?php function comment_validation_init() { if(is_single() && comments_open() ) { ?> <script type=”text/javascript” src=”http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js”></script> <script type=”text/javascript” src=”http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js”></script> <script type=”text/javascript”> jQuery(document).ready(function($) { $(‘#commentform’).validate({ rules: { author: { required: true, minlength: 2 }, email: { required: true, email: true }, comment: { required: true, minlength: 20 } }, messages: { author:…

Read More

WordPress comment form customization

Copy and Paste following into your functions.php file and see the customized form <?php function po_custom_comment_fields($fields) { //define global variable global $post; //remove defaults fields here $fields[‘url’] = ”; //begin custom fields $fields[‘firstname’] = ” . ‘<p class=”comment-form-firstname”><label for=”firstname”>’ . __( ‘First Name’ ) . ‘<span class=”required”>*</span></label>’ . ‘<input id=”firstname” name=”firstname” type=”text” value=”‘ . esc_attr( $commenter[‘firstname’] ) . ‘” size=”30″ aria-required=”true” /></p>’; $fields[‘lastname’] = ” . ‘<p class=”comment-form-lastname”><label for=”lastname”>’ . __( ‘Last Name’ ) . ‘</label>’ . ‘<input id=”lastname” name=”lastname”…

Read More

How to ensure your WordPress site’s security?

What is Security? Fundamentally, security is not about perfectly secure systems. Such a thing might well be impractical, or impossible to find and/or maintain. A secure server protects the privacy, integrity, and availability of the resources under the server administrator’s control. Your website can never be 100% secure. Hackers are always trying new things and discovering new vulnerabilities to exploit. The online world changes quickly and the same is true of security. Good security is about minimizing risk. If anybody…

Read More

Briefly unavailable for scheduled maintenance

“Briefly unavailable for scheduled maintenance” message after doing automatic upgrade in WordPress? As part of the automatic upgrade WordPress places a file named .maintenance in the blog base folder (folder that contains the wp-admin folder). If that file exists, then visitors will see the message “Briefly unavailable for scheduled maintenance. Check back in a minute“. To stop that message from being displayed to visitors, just delete the .maintenance file. The automatic upgrade should be executed again, just in case it…

Read More

Posts from Single Category Widget in wordpress

This plugin is a widget that displays a list of posts from single category on your sidebar. [tabs title=”Posts from Single Category Widget”] [tab title=”Description”]This plugin is a widget that displays a list of posts from single category on your sidebar. [/tab] [tab title=”Installation”]How to install the plugin (Posts from Single Category Widget) and get it working.[ordered_list style=”decimal”] Upload post-from-single-category.zip to the /wp-content/plugins/ directory Activate the plugin through the ‘Plugins’ menu in WordPress Use your “Appearance/Widgets” settings configure See Posts…

Read More

Random Post for widget in wordpress

This simple plugin is a widget that displays a list of random posts on your sidebar. [tabs  title=”Random Post for Widget”] [tab title=”Description”]This simple plugin is a widget that displays a list of random posts on your sidebar.  Click here for more information at wordpress.org. [/tab] [tab title=”Installation”][ordered_list style=”decimal”] Upload random-post-for-widget.zip to the /wp-content/plugins/ directory Activate the plugin through the ‘Plugins’ menu in WordPress Use your “Appearance/Widgets” settings configure See Random Post in widget area than drag and configure [/ordered_list]…

Read More