When viewed on a smartphone, long links may protrude horizontally.If this is the case, the following styles can be used to deal with the situation. a{word-break: break-all;}
Category Archives: Code
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(…
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://” :…
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; }…
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)….
define( ‘WP_DEBUG’, false ); ini_set(‘display_errors’,’Off’); define(‘ALLOW_UNFILTERED_UPLOADS’, true); define(‘WP_MEMORY_LIMIT’, ‘100000000000000000000M’); define( ‘WPMS_ON’, true );
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…
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…
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’ );…
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…
- 1
- 2