Display Category description in WordPress

  • 01.06.2021
  • Posted in: Themes

If you want to add a category description to the category page, you need to open a file that displays categories in your theme, usually this is a file archive.php or category.php and add this code to it <?php echo category_description(get_the_category()[0]->cat_ID); ?> 123 <?phpecho category_description(get_the_category()[0]->cat_ID);?> Also...

read more

Customizer Ex - simple customizer export import plugin

  • 09.05.2019
  • Posted in: Plugins

This plugin allows you easily export and import Customizer settings. Download Installation Unzip plugin files and upload them under your '/wp-content/plugins/' directory. Activate plugin at "Plugins" administration page. Usage To make export/import go to Settings - Customizer EX page. After activation current customizer settings will be saved at file theme_mods_themename.txt in '/wp-content/uploads/'...

read more

Increase lvm size in Debian

  • 08.10.2019
  • Posted in: Linux

Let's see how much free space we have pvs PV VG FMT Attr PSize PFree /dev/sda1 v1 lvm2 a - - 60.43 15.84 Then choose the right LV Path volume lvscan I will increase the size of the root volume /dev/v1/root Increase the size by 2 Gigabytes lvextend -L+2G /dev/v1/root Сheck the file system for errors e2fsck -f /dev/v1/root Resize the filesystem resize2fs /dev/v1/root Check the new LVM size lvs

read more

Grub2 recovery from live USB (LVM)

  • 01.04.2019
  • Posted in: Linux

Boot from live usb. I use Debian 8. Open terminal and type sudo su Install LVM apt-get install lvm2 List all logical volumes in all volume groups lvscan I have such a LVM structure ACTIVE '/dev/v1/boot' [100.00 MiB] inherit ACTIVE '/dev/v1/root' [10.00 GiB] inherit ACTIVE '/dev/v1/tmp' [500.00 MiB] inherit ACTIVE '/dev/v1/var' [30.00 GiB] inherit Now mount devices to mnt folder mount...

read more

Emmet code examples in Sublime text

  • 01.03.2019
  • Posted in: CSS  HTML

Run in Sublime menu Package Control: Install Package command, type Emmet and install it. First type code in Emmet syntax, after that press Tab on your keyboard and view result. ul.nav <ul class="nav"></ul> 1 <ul class="nav"></ul> li{some text}*2 <li>some text</li> <li>some text</li> 12 <li>some...

read more

Delete post revisions and disable revisions

  • 04.11.2018
  • Posted in: Plugins

This WordPress plugin allows you delete all post revisions and disable post revisions. Usage: 1. After activation plugin settings available on Del-Post-Rev settings page 2. To just delete the current post revisions, click the button "Delete post revisions and Save" 3. To disable revisions, check the checkbox "Disable post revisions" Download The SQL query that is used to delete post revisions: $wpdb->query(" ...

read more

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


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