Category Archives: Code

I want to assign ‘parent’ and ‘child’ to attributes in Woocommerce!How to enable without plug-ins.

Have you ever wished you could create ‘parents’ and ‘children’ for Woocommerce ‘attributes’, like categories? This function used to exist but has disappeared after version upgrades. To make it available in the current version, please add the following code to the ‘functions.php’ of your theme (or child theme if using a child theme). if( function_exists(…

How to unzip a zip file in the server.

Assume the file you want to unzip is ‘example.zip’. 1:Upload the zip file you want to unzip. Upload the zip file ‘example.zip’ to the directory where you want to unzip it. 2:Creating and uploading unzip.php. Create the following php file and upload it to the same directory as 1 above. <?php $scriptfullpath=(empty($_SERVER[“HTTPS”]) ? “http://” :…

How to make YouTube embedding responsive while maintaining proportions with CSS.

Learn how to make YouTube embeds responsive while maintaining the ratio. 1:Add div tag. Add a div tag to enclose the iframe tag. <div class=”yt”><iframe width=”560″ height=”315″ src=”https://www.youtube.com/embed/YUDbl9qBihk?si=RRyI62O5tVSEfHvo” title=”YouTube video player” frameborder=”0″ allow=”accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share” referrerpolicy=”strict-origin-when-cross-origin” allowfullscreen></iframe></div> 2:Add css. Add the css. .yt { width: 100%; aspect-ratio: 16 / 9; }…

Small fonts on WordPress backend post pages!How to change font size.

Are the fonts on WordPress back-end post pages too small? In such cases, this is. If you write all this down, you can customise the font size and other aspects of the posting page (text) as you wish. Please add this to the ‘functions.php’ of the theme (or child theme when using a child theme)….

Without Plugin!How to LazyLoad Google Adsense to speed up display speed.

Loading Google Adsense significantly reduces page display speed. The following methods will improve the expectation of problem resolution and should be tried. Remove Script tag in Google Adsense code. <script async src=”https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-8085372009702943″ crossorigin=”anonymous”></script> <ins class=”adsbygoogle” style=”display:block” data-ad-client=”ca-pub-8085372009702943″ data-ad-slot=”2683573049″ data-ad-format=”auto” data-full-width-responsive=”true”></ins> <script> (adsbygoogle = window.adsbygoogle || []).push({}); </script> Delete the following part of…

How to score 100 on the Google Speed Test.How to create better web vitals with WordPress themes and plugins. ‘Checklist for developers’.

This post explains how to get a score of 100 on the google speed test. 1.Files You need to check the files loaded on your site by the theme and plugins.To do this, go to Google Speed Test and check your site. Click on the button ‘VIEW TREEMAP’.Click on the button to find the slowest…

Without Plugin!How to display just any item on the Woocommerce My Account page.

The items on the Woocommerce My Account page vary depending on the products handled and the site they are on. For example, if you want to hide the ‘Dashboard’ and ‘Downloads’ items, you can achieve this by doing the following. Write the following code in the ‘functions.php’ file. // shoptab add_filter ( ‘woocommerce_account_menu_items’, ‘misha_remove_my_account_links’ );…

Without Plugin!Easy copy and paste. how to add a site name shortcode to WordPress.

It is very time-consuming to rewrite site names when producing multiple sites. As a way of preventing this from happening, it is recommended to set up a system to call the name of the site by a shortcode. Write the following code in the ‘functions.php’ file. add_shortcode( 'sitename', function() { return get_bloginfo(); } ); Enter…

This site uses cookies to offer you a better browsing experience. By browsing this website, you agree to our use of cookies.