Friday , December 20 2024

Wordpress

Wordpress – articles, how-to-fix notes, fast solutions

How to display the Nextgen Gallery

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 »

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 »

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 »