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 »Display the date + a few days from the current one
The task in short: you need to make the delivery date + 5 days from the current date in PHP, with the output of the month in the genitive case in RU. But you can ignore custom edits for that language version. The method with date( ‘d FY’ ); is …
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 »Color change for placeholder in input not working
By default, gray font is displayed, which does not blend well with a dark background. If in css it is easy to change the background for the input, then I had to find a solution for the text color in the placeholder. This example helped me solve the problem (the …
Read More »How to remove 404 //fonts.gstatic.com and //fonts.googleapis.com from WordPress head section
I tried solutions with functions that should remove from head and , but a very simple solution solved the problem: remove_action( 'wp_head', 'wp_resource_hints', 2 ); You need to place it in functions.php.
Read More »301 redirect – remove slashes after domain name
If you need to make ‘https://domain.com/////////////’ links like this ‘https://domain.com/’, you can copy the following solution to .htaccess. In this case, the redirect will be instant (not multistep). RewriteEngine on RewriteBase / RewriteCond %{HTTP_HOST} !="" RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.*)\sHTTP/[0-9.]+$ [OR] RewriteCond %{THE_REQUEST} ^[A-Z]+\s(.*/)/+\sHTTP/[0-9.]+$ RewriteRule .* https://%{HTTP_HOST}/%1 [R=301,L] RewriteCond %{REQUEST_URI} ^(.*)//(.*)$ RewriteRule …
Read More »301 redirect in .htaccess from uppercase to lowercase characters
In web development, managing URL consistency is crucial for SEO and user experience. One common task is redirecting URLs with uppercase characters to their lowercase counterparts. This article provides a working example for redirecting URLs like http://domain.com/sUcH_liNKs to their lowercase versions using .htaccess. While the solution is large and not …
Read More »Fa fa Telegram icon not showing
Usually, after making edits according to the instruction “Fa fa icon is not displayed”, all icons are displayed correctly. But not telegram, which is not mentioned at all in the included CSS from font-awesome. So open up your CSS and add this one: .fa-telegram:before {content: "\f2c6"; }
Read More »How to display page title anywhere in Joomla template
This solution was tested on joomla 3, here is the code to use: <h1 itemprop="name"> <?php echo $this->escape($this->item->title); ?> </h1>
Read More »