By default, the product edit page has several tabs that are never used for simple stores. In this article, the code you need to put in functions.php in your theme folder. In this example, the Deliveries tab is removed, but you can uncomment any line and the tab that you …
Read More »Webmaster notes
How to add Woocommerce product categories to WordPress menu
It’s time for serious questions and quick answers. If you do not see Product Categories to add to the menu, then you need to click on the “Screen Settings” button in the WordPress panel and check the box Product Categories. Finita.
Read More »How to remove “Category:” in the title of the article category
This issue is relevant if the title was added using the_archive_title();. To remove the extra phrase “Category:”, you need to use the hook: add_filter( 'get_the_archive_title', 'lets_remove_name_category' ); function lets_remove_name_category( $title ){ if ( is_category() ) { $title = single_cat_title( '', false ); } elseif ( is_tag() ) { $title = …
Read More »How to display h1 in WordPress theme
This task is relevant for cases when developers in custom templates for some reason decide not to display the page title, although according to all SEO requirements it should be, and should be wrapped in h1. Heading Examples 1. In the page template: in the page.php of your theme, add …
Read More »Visualcomposer – error array_search() expects parameter 2 to be array, null given (ContentUrlReplaceController.php)
This error appeared after the transfer of the site to another domain. Due to this error, there is no access to /wp-admin, and this error is displayed on the site above the content: Warning: array_search() expects parameter 2 to be array, null given in /wp-content/plugins/visualcomposer/visualcomposer/Modules/FrontView/ContentUrlReplaceController.php on line 68 The error …
Read More »How to colorize every second or odd element in css
I used the most popular query for my practice in the post title, but there are more options in the table below. Options for :nth-child 1 1 The first element, is a synonym for the :first-child pseudo-class 5 5 5th element 2n 2, 4, 6, 8, 10 All even elements, …
Read More »Show and hide block with js
Few examples for showing a block on button click. Example 1: easy to use <script type="text/javascript"> function openlink(id){ display = document.getElementById(id).style.display; if(display=='none'){ document.getElementById(id).style.display='block'; }else{ document.getElementById(id).style.display='none'; } } </script> The block will be opened by clicking on the link: <a href="#" onclick="openlink('mylink'); return false">Open the link</a> Content will be shown when …
Read More »Fa fa icon not showing
If your icons, for example <i class=”fa fa-arrow-right”></i> are not displayed on your site, you need to try in the <head> section add this line: <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet" media="screen" /> Important! Be sure to use https instead of http. If it doesn’t solve the problem, then add this property to …
Read More »Contact form in a pop-up window
One of the most popular forms for WordPress is Contact Form 7, but in the settings there is no way to call the form through a click. You can download the Easy Fancybox plugin, go to Settings – Media and in the Enable FancyBox for block, uncheck Images, and check …
Read More »Zooming in and out of an image/button/link when hovering over an element
You need to use the transform property and set it to scale(1.1) to increase it and scale(0.9) to decrease it. When hovering over an image/button/link with the class button, it will increase by 10% or decrease by 10%. Increase image/button/link – CSS: .button:hover { -webkit-transform: scale(1.1); -ms-transform: scale(1.1); transform: scale(1.1); …
Read More »