News

Change session path in PHP-FPM

If you use Linux default sessions in php are stored at /var/lib/php/sessions/ and you want change this settings, create in your server folder sessions like this /var/www/sessions/ Set permissions chown -R www-data:www-data /var/www/sessions chmod 777 /var/www/sessions Note: www-data it`s your nginx user, you can check it in file /etc/php5/fpm/pool.d/www.conf Now edit php.ini and set path to your new sessions folder session.save_path...

read more

Upgrade php5 to php7.1 on Debian

To install php7.1 you don't need to delete php5. PHP 7.1 will be installed in a separate folder /etc/php/7.1/ First add Dotdeb PPA and import the GPG key of Dotdeb repository apt-get install apt-transport-https lsb-release ca-certificates wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg Then add PPA in your server and update echo 'deb https://packages.sury.org/php/ jessie main' > /etc/apt/sources.list.d/php.list apt-get...

read more

q-Shortcodes

This plugin allows you to add the following shortcodes to a page or post: Columns (12 col grid) Buttons Buttons with Ionicons icons or FontAwesome icons Toggles Tabs Icons block Services block Dividers Clear Note: If you set Divider Style - Double, you also need  set Divider Height - 4px Customizer settings Plugin Customizer contains the following settings: Change Button background, Button color, Button icon color...

read more

Show post views without plugin

If you need to show the number of posts or pages on your WordPress site without using a plugin, you can write a simple function and add it to the functions.php Wordpress function simple_post_views( $post_ID ) { global $count_key,$count; $count_key = 'simple_post_views_count'; $count = get_post_meta( $post_ID, $count_key, true ); if ( $count == '' ) { $count = 0; update_post_meta(...

read more

Creating a simple shortcode button

In this tutorial I create simple button shortcode with three attributes: url target background Put this code in your functions.php file Wordpress function btn_big_shortcode( $atts, $content = null ){ $args = shortcode_atts( array( 'url' => '', 'target' => 'self', 'background' => '#F39D77', ), $atts ); $out = '<div class="btn-big"> <a...

read more

Ajax message

This wordpress plugin allows you send messages to email from a page, post or from any other location that you specify in template. It can be used as a shortcode or a widget. Has a admin settings page where you can change the names of fields, enable or disable captcha, add custom CSS code. Download Live Demo Name: Message: Enter code: awq23 ...

read more