Saturday , February 22 2025

Articles

Include the file and display the value if it is specified in this file

This method was created for SEO edits on the Bitrix site (generated h1 values were entered in the file and displayed in the template). Today I returned to this solution for canonical edits, here is the code and description: <?php include($_SERVER['DOCUMENT_ROOT']."/seo.php");  if(isset($seoh1) AND $seoh1!='') {echo $seoh1;} else {echo $heading_title;} ?> …

Read More »

How to display gc_breadcrumbs in WordPress theme

If the site uses a theme not with default breadcrumbs, but with gc_breadcrumbs, and you use custom post types, then there may be a problem when breadcrumbs are not displayed on the site. Here is the code that allows you to display the plugin anywhere in the site template: <?php …

Read More »

How to add a new menu area in wordpress

In the process of customizing templates, it is often necessary to add and display a new WordPress menu. To do this, you need to paste the following code into functions.php: function wpb_custom_new_menu() { register_nav_menu('my-custom-menu',__( 'My Custom Menu' )); } add_action( 'init', 'wpb_custom_new_menu' ); If you need to add multiple areas …

Read More »

Error Not Acceptable An appropriate representation of the requested resource could not be found on this server.

After transferring the site to another host and trying to save changes in the admin panel, for example, such a code: <p class="block"> <svg xmlns="http://www.w3.org/2000/svg" width="700" height="72" viewBox="0 0 700 72"> <text x="0" y="70">Stroked text</text> </svg> </p> I get an error: Not Acceptable An appropriate representation of the requested resource …

Read More »

Text with border/border around text in css

This article describes two options for decorating text with a border around the text along the path of the same text. There are, of course, more of these options. But I usually use the ones listed below. Example 1, crappy: using the text-shadow property text-shadow: 1px 0 0 red, -1px …

Read More »

How to show hidden files in Finder?

By default, the Finder does not show any files or folders that begin with a dot. To allow Finder to show hidden files, run the following command in the console: defaults write com.apple.finder AppleShowAllFiles TRUE ; killall Finder To hide the display of hidden files again, use the command: defaults …

Read More »

On_sent_ok not working in Contact Form 7

If your site uses the old version of WordPress and the Contact Form 7 plugin, it is enough to use the code in the Advanced settings tab: on_sent_ok: "yaCounterXXXXXXXX.reachGoal('mygoal');" Where XXXXXXXX is the counter ID in Yandex Metrika, mygoal is the name of the goal that was previously created in …

Read More »