If you are building multiple WordPress sites, you face the problem of having to ‘rewrite URLs’ when duplicating them.
The following code is recommended to solve this problem before it happens.
Please describe it in the theme’s ‘functions.php’ file.
/* Description in functions.php */
add_shortcode('url', 'shortcode_url');
function shortcode_url() {
return get_bloginfo('url');
}
add_shortcode('tdir', 'tmp_dir');
function tmp_dir() {
return get_template_directory_uri();
}
add_shortcode('cdir', 'child_dir');
function child_dir() {
return get_stylesheet_directory_uri();
}
If the above is done,
https://frecer.com・・・Used to describe links within a page.[tdir]・・・Used to reference images in the theme file (parent theme).
[cdir]・・・Used to reference images in theme files (child themes).
This can be used in the form of.
CDN Security Speed
DNS configuration with Cloudflare.Set up bombastic DNS for a more comfortable IT life.
DNS configuration with Cloudflare not only speeds up browser start-up, but also contributes to improved security. Please give it a try. 1. 1.1.1.12. 1.1.1.1 family oriented.2.1. Blocks malware.2.2. Blocks malware and adult content. 1.1.1.1 1.1.1.1 is Cloudflare’s public DNS resolver.It...
Continue readingPlant Raise
The key points are sun, wind, water and soil! How to grow succulents.
Succulents are very easy to grow compared to other plants. There are four simple points. Maintain in a sunny location. Maintain in a well-ventilated area. Water when the soil is dry. Plant in well-drained soil. As long as the above...
Continue readingCode Web Without Plugin
The one you write in wp-config.php for now.
define( 'WP_DEBUG', false ); ini_set('display_errors','Off'); define('ALLOW_UNFILTERED_UPLOADS', true); define('WP_MEMORY_LIMIT', '100000000000000000000M'); define( 'WPMS_ON', true );
Continue readingSponsor
Frecer Sponsorship applications are now open!
We are pleased to announce that we are now accepting applications for Frecer sponsorship. Sponsor We offer a variety of plans and special offers. The funds you support will help to realise a number of projects. We sincerely look forward...
Continue readingCode Web Without Plugin Wordpress
Without plugins!Copy and paste, 3 minutes, super easy!How to implement dark mode.WordPress
Implement dark mode in WordPress.No plugin is required. 1. 1.JavaScript description.2. 2.Css description.3. 3.HTML description. 1.JavaScript description. Put the following js code in the header. document.addEventListener('DOMContentLoaded', function() { const toggleButtons = document.querySelectorAll('.toggle-mode'); toggleButtons.forEach(function(button) { button.addEventListener('click', function() { const currentMode =...
Continue readingCode Web Without Plugin Woocommerce Wordpress
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...
Continue readingCode Speed Web Without Plugin Wordpress
Without plugins!How to use syntax highlighting Prism.js.|WordPress
In this article, we will show you how to implement syntax highlighting in WordPress without using a plugin. Syntax highlighting is often used to display source code on websites and blog sites. This website has adopted “Prism.js” after various trials....
Continue readingCode Web Wordpress
How to save rewriting links.WordPress
If you are building multiple WordPress sites, you face the problem of having to ‘rewrite URLs’ when duplicating them. The following code is recommended to solve this problem before it happens. Please describe it in the theme’s ‘functions.php’ file. /*...
Continue readingCode Web Without Plugin Wordpress
Without plugins!How to display a blog card with internal and external link support.|WordPress
Learn how to display blog cards in WordPress without using a plugin. Plug-in non-use has various advantages, such as reducing server load and maintaining site display speed. WordPress has a large variety of plugins, but you want to customise it...
Continue readingPlant
What is a cactus. Origin and characteristics of ‘Cactos’ [1].
The word ‘Cactus’ derives from the Greek word ‘Kàktos’. The term was used by Theophrastus in his book HistoriaPlantarum to describe ‘unknown thorny plants’. The term ‘Cactus’ was subsequently adopted by the renowned botanist Linneo to define the American thorny...
Continue reading