WordPress Plugin for add Terms and Conditions to register form

WordPress Plugin Terms and Conditions

WordPress Plugin Terms and Conditions for register form work with Woocommerce and Paid Membership Pro

In Plugin settings can choose what page to show for terms and conditions. And can activate for use with Paid Membership Pro.

With this plugin is easy to add checkbox to register form for terms and conditions.

You can get this plugin here.

I will add to choose view terms and condition in pop-up window or open in new (like in moment). And add fields with text where input text of label (link) for terms and conditions.

I use this plugin in approbet


Questions and Answers WordPress Plugin

With “Questions and Answers WordPress Plugin” can get questions from contact form 7 and make answers.

with this WordPress plugin can get mail from your chosen contact form and make it like question and answer.

When somebody send you mail from this chosen contact form, you have mail and this mail is in new posts Questions. And in every one mail you can write answer and publish.With publish the plugin send auto answer to this person witch send you question.

Here is demo

Questions and Answers WordPress Plugin is for use with contact form 7

You can get this plugin here

Events Calendar Plugin for WordPress

Events Calendar Plugin for WordPress – This is plugin for wordpress witch shows events in calendar.

We have new posts named Events. And two new taxonomies for different type events.

In plugin we have two shortcodes for display what we need.

First one is for widget display calendar with events.

Second one is with option to display calendar, from what taxonomy to display posts and last thing is for from what term to display posts.

here click you can view the page with shortcode for widget

here click you can view the page with shortcode for display posts with calendar.

You can get this plugin here

How to force download file in WordPress

Here is piece of code for how to force download file in WordPress

$file = $download['link']; //this is url of file - http://yoursitename.com/.../.../yourfile

$file_location = $_SERVER['DOCUMENT_ROOT'] . substr($file, strpos($file, '/wp-content')); // this is real path /var/www/....

header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename=' . basename($file));
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($file_location));



Two Step Login – WP Plugin

This is Plugin For Security.Two Step Login – WP Plugin.

two step login
two step login

Plugin have two option for authorisation.

  • Mail code
  • SMS code

Settings for Mail is:

  • Text for Mail Subject
  • Text Before Code
mail settings
mail settings

Settings for SMS is:

  • Username for sms server
  • Password for sms server
  • Webservice Token
  • Webservice URL
  • Text before code
sms settings
sms settings

Plugin make custom field in User Profile settings for phone number of user.


How to Add columns in Admin Screen

If You want to add custom column in admin for page, post or custom post – it’s easy to make it.

First must add a title for column and this is the code witch to use in your function.php :

add a hook:

add_filter('manage_posts_columns', 'custom_column_head');

and add function ‘custom_column_head’ :

function custom_column_head($defaults) {
    global $post;
    $post_type = get_post_type($post->ID);
    if ($post_type == 'your_post_type_here'):// this is in case to show only in one custom post type
        $defaults['your_title_here'] = __('Your Title Here');
    return $defaults;

Now we have new custom column title in our custom post type.If we use in posts or pages the if statement will be different.

Now we must show some in our column. Add a hook:

add_action('manage_posts_custom_column', 'custom_columns_content', 10, 2);

And function ‘custom_columns_content’ :

function custom_columns_content($column_name, $post_ID) {
    $post_type = get_post_type($post_ID);
    if ($post_type == 'your_post_type'):
        if ($column_name == 'your_title_here'):
            echo 'Here Is this witch you whant to show';

I Use this in my projects. Here is one of them – Link

Help for WordPress Developers

Here is some links witch is helpful for WordPress developers.


This is generators for most things in WP – here

This is empty plugins generator for WP – here

This is another plugin generator for WP – here

This is helpful for dashicons for WP – here

Another Plugin generator for WP –here

Some CSS generators – here

Font Face generator – here

Goot Tutorial for integration jQuery Izotope in WP – here

CSS tricks for WP –here



WooCommerce Product Colors – plugin

I write this plugin for one of my project.

Here You can view Demo

You can get this plugin here

On Shop page visual only 2 products, but they are actually 4 in admin. Bottom of picture is color variation of products.Every color box is link to variation of product.And with mouseover on color-box change big picture of product, title of product, link to product and price of product.Here is Demo

In single product page color box is active links to the same product in different color.This is Demo.


In Admin page we have 2 new boxes –Product Color and Color Group.

In Product Color box we choose a color of product witch is visual in shop page and product page.

In Color Group we bring the name on group of products.In every product we mast choose the group.

Project where I use similar approach is here


This is all of products we have in admin products in woocommerce.

To show only one of products color group we have to choose one of group with settings Catalog visibility: Catalog/search from Publish option box in product  – picture – option 1 ,

and other of group with settings Catalog visibility: Search from Publish option box in product – picture – option 2.

option 2
option 2

















After install plugin is recommend to use regenerate thumbnail tool


How to change get_price_html in woocommerce

How to change get_price_html in woocommerce

First you put this code in your functions.php file.

//custom get price html
add_filter( 'woocommerce_get_price_html', 'custom_price_html', 100, 2 );
function custom_price_html( $price, $product ){
    return str_replace( '</del>', '<span class="del-img"></span></del>', $price );

After change style in your style.css file.

span.del-img {
    position: absolute;
    top: 10px;
    left: 0px;
    background: url('img/del-img.png') 50% 50% no-repeat;
    background-size: 100% 100%;
    z-index: 20;
    width: 100px;
    height: 25px;

del {
    text-decoration: none;

This is all.

I use this in one of my project: beatsbydre




How to add editor wysiwyg in metabox

This is example how to add editor in metabox.

First here add your metabox:

function custom_metabox() {
    add_meta_box('name for metabox', __('title for metabox', 'your theme name'), 'your function', 'post or your custom post type');

add_action('add_meta_boxes', 'custom_metabox');

Then create visualization for your metabox:

function your function() {
    global $post;

    $content = get_post_meta($post->ID, 'your meta key', true);
    $editor_id = 'your editor name'; // this is editor which to use
    wp_editor($content, $editor_id); // here is editor

And here is save:

add_action('save_post', 'your function for save');

function your function for save() {
    $editor_id = 'your editor name';
    $meta_key = 'your meta key';
    if (isset($_REQUEST[$editor_id])):
        update_post_meta($_REQUEST['post_ID'], $meta_key, $_REQUEST[$editor_id]);

This method I use here in my site for short description in posts – selected text in picture. And the link: my site

custom meta box
custom meta box



How to make empty comments in WP

If need to show only stars in rating system in woocommerce – the question is : how to show empty comment content, How to make empty comments in WP?

Answer is: Just put this code in your functions.php

add_action('pre_comment_on_post', 'custom_comment');

function custom_comment($post_id) {

    $random = '<code>This is Auto comment with random key: ' . rand(1, 1000000) . '</code>';

    if (empty($_POST['comment'])):
        $_POST['comment'] = $random;

and this in your style.css

.comment_container code {
    display: none;

this is it!




How to create custom social share buttons

How to create custom social share buttons











After this I use a this html code:

<a class="share" href="some of upper code">your image</a>

And the javascript:

jQuery(document).ready(function ($) {

    $('a.share').click(function () {
        return !window.open(this.href, "pop", "width=600,height=600");


I use this for project: beatsbydre




Get posts ids by post title

Get posts ids by post title

function get_posts_by_title($title, $post_type = 'post') {
   global $wpdb;
   $posts_ids = array();
   $posts = $wpdb->get_results($wpdb->prepare("SELECT ID FROM $wpdb->posts WHERE post_title = %s AND post_type = '" . $post_type . "'", $title),     OBJECT);
   foreach ($posts as $post) {
       $posts_ids[] = $post->ID;
   return $posts_ids;

Put this function in functions.php and can use in your code.

This function I use in project beatsbydre