On this page I publish shortcodes to insert into an article, or into a template. Option 1 – default: [ngg src="galleries" ids="1" display="basic_thumbnail" thumbnail_crop="0"] Option 2 – show multiple galleries: [ngg src="galleries" ids="1,3" display="basic_thumbnail" thumbnail_crop="0"] Option 3 – displaying images by tags: [ngg src="tags" ids="primertega" display="basic_thumbnail" thumbnail_crop="0"] Option 4 – …
Read More »Wordpress
How to place a favicon on a website
If you’re using a site with a CMS, you probably already have a default favicon that you’ll want to change. To do this, you need to search for the favicon.ico line in the source code, and you will see in which folder the current favicon is loaded. The easiest method …
Read More »How to display a shortcode in a WordPress theme
Shortcodes make our life a lot easier, they are often generated by plugins and all we have to do is display the shortcode in the WordPress theme. Use code like this: <?php echo do_shortcode( '[shortcode]' );?> Where instead of shortcode write your shortcode name, and do not forget about the …
Read More »How to get value from ACF plugin field
The ACF plugin is needed to create and display additional fields for articles. For example, we need to add the color field to articles and display it in the template. The procedure is standard: go to Plugins – Add new – search for ACF (Advanced Custom Fields), install and activate. …
Read More »If the link contains the word
The case: If a word occurs in the URL, then you need to display some text. For example, if the URL contains “hahaha”, then on the page you need to display the text “description of the text hahaha”. PHP solution: <?php if(strpos($_SERVER['REQUEST_URI'], 'hahaha') !== false){ echo "description of the text …
Read More »How to display Breadcrumb NavXT in WordPress theme
In this article, I do not want to describe the detailed process of installing the Breadcrumb NavXT plugin, but if someone really needs it: Go to the WordPress panel in the Plugins section – Add New. Search for Breadcrumb NavXT, install and activate it. This plugin will not be automatically …
Read More »“Parse error functions.php on line 1064” when installing WordPress
The error that occurred when installing a fresh version of WordPress on a new hosting: Parse error: syntax error, unexpected '.', expecting '&' or variable (T_VARIABLE) in /wp-includes/functions.php on line 1064 The solution turned out to be extremely simple: the PHP 5.4 version was activated on the hosting, when the …
Read More »How to remove all menu items in WordPress admin panel
It often happens that you need to delete all the menu items. This is easy to do using the single-item deletion method, but how to solve the problem if there are 100 menu items? Yes, there are many sites with long lists of directories/categories and huge navigation. Another case: you …
Read More »How to remove wpemoji from the WordPress
Many people think that emoticon icons should be bright and pretty. And WordPress decided that from version 4.2 it would be super-modern if a lot of garbage was added to its source code. Now in the head of your site, you can see code like this: To free WordPress from …
Read More »How to create a full backup of a WordPress site
I will not get tired of repeating how important it is to make backups of sites. This article describes 3 options for creating a backup – via ssh, via ftp, via the hosting provider’s panel, using a plugin. Option 1: backup via ssh 1. Connect to the server (you can …
Read More »