Saturday , February 22 2025

iryna

Hi there! My name is Iryna, I am a web developer from Ukraine. While working on freelance projects I often face different technical issues and in this blog I publish articles on how to solve them. I am also interested in digital drawing and in this blog you will find brief tutorials that helped me and hopefully can help you as well.

301 redirect without slash to slash

In this article, I posted examples for redirecting from the pages without a slash to pages with a slash. Example 1: 301 redirect without slash to slash RewriteCond %{REQUEST_URI} !\? RewriteCond %{REQUEST_URI} !\& RewriteCond %{REQUEST_URI} !\= RewriteCond %{REQUEST_URI} !\. RewriteCond %{REQUEST_URI} !\/$ RewriteRule ^(.*[^\/])$ /$1/ [R=301,L] Example 2: 301 redirect …

Read More »

301 redirect from slash to without slash

Examples of redirects from pages with a slash to without a slash: Example 1 – 301 redirect from slash to without slash RewriteCond %{REQUEST_URI} !\? RewriteCond %{REQUEST_URI} !\& RewriteCond %{REQUEST_URI} !\= RewriteCond %{REQUEST_URI} !\. RewriteCond %{REQUEST_URI} ![^\/]$ RewriteRule ^(.*)\/$ /$1 [R=301,L] If your site uses a CMS (for example, Opencart), …

Read More »

Transition – smooth effects

A sharp change in the background when hovering over the block, or a sharp change in the color of the button text when hovering, without effects does not look cool. To make a smooth “fade”, you need to use one property for the main element, and for its :hover. Code …

Read More »

Perfect robots.txt for WordPress

In this article I have posted 2 examples – simple and advanced. In each example there will be lines that you need to change, below there will be notes with specifics of what should be changed. 1st robots.txt, optimized for SEO User-agent: * Disallow: /cgi-bin Disallow: /? Disallow: /wp- Disallow: …

Read More »

How to display a product attribute anywhere in Woocommerce

With this code, you can display a product attribute in the template, for example, “size”. global $product; echo $product->get_attribute('size'); Below I publish a method for displaying a property with an additional icon output, if this property is filled in: <?php $subheadingvalues = get_the_terms( $product->id, 'pa_time'); if ($subheadingvalues): ?> <div class="labeltime"><i …

Read More »

How to display product SKU in Woocommerce product card

As it often happens, we do not need product SKU where it is placed in the template. To display in the right place, use this code: <?php echo '' . $product->sku . ''; ?> When I published this code on a test project (in /woocommerce/single-product/short-description.php) as a result, the product …

Read More »