Friday , December 20 2024

Webmaster notes

How to recursively change a word in all site files

When managing a website, you may encounter situations where you need to replace a specific word or domain across multiple files. This task can arise for various reasons, such as updating outdated content, rebranding, or correcting errors. Fortunately, you can achieve this efficiently by using command-line tools to recursively find …

Read More »

How to disable click on links using CSS?

Easy question, easy solution. We can disable click on all links, or we can use id or class for the particular links that should be unlickable and use: pointer-events: none; I use it for the case when I need to disable clicks on the images to avoid popup windows on …

Read More »

How to open html pages without .html

If your site uses links like http://domain.com/testpage.html and http://domain.com/demo.html, and you want them to open like http://domain.com/testpage and http://domain.com/demo, you can use this solution. Go through FTP or a File Manager to the folder with the site files. Open file .htaccess and add the following code: RewriteEngine on RewriteBase / …

Read More »

How to remove h3 from AAPF – Advanced Ajax Product Filters (Rocket)

This article is about how to remove unused h3 tags, but not completely – just replace them to div tags. To solve this problem, you need to add this code to functions.php: add_filter('BeRocket_AAPF_template_full_content', 'some_custom_berocket_aapf_template_full_content', 4000, 1); add_filter('BeRocket_AAPF_template_full_element_content', 'some_custom_berocket_aapf_template_full_content', 4000, 1); function some_custom_berocket_aapf_template_full_content($template_content) { $template_content['template']['content']['header']['content']['title']['tag'] = 'div'; return $template_content; }

Read More »

Css styles for WordPress admin in functions.php

If you need to add individual styles, and they are only a couple of lines, you can add them directly to functions.php: add_action('admin_head', 'webinp_style'); function webinp_style() { print '<style> tr[data-slug="to-top"] {display: none !important;} </style>'; } Between <style> and <style> you need to write your own CSS styles.

Read More »