Category Archives: Web

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…

How to make all pages permanently SSL.WordPress

Has SSL been installed on your website? The introduction of SSL is recommended for all websites because of its security and SEO advantages. Full-page SSL is particularly desirable for shopping and crowdfunding websites where personal data and payments are involved. The following code is recommended for full-page SSL. Put this in the “.htaccess” file. ※Be…

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. /* Description in functions.php */ add_shortcode(‘url’, ‘shortcode_url’); function shortcode_url() { return get_bloginfo(‘url’); } add_shortcode(‘tdir’, ‘tmp_dir’); function…

Without Plugin!No plug-ins! How to implement a table of contents.|WordPress

Learn how to implement a table of contents in WordPress without using a plugin. This method does not use JQuery and is also the implementation method introduced on this website. It takes less time and man-hours, if you like. The following steps are to be implemented. Edit functions.php. Editing CSS. Set display conditions on the…

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 without using as many as possible. We would like to introduce an implementation method that…

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.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 = localStorage.getItem(‘data-mode’); const newMode = currentMode === ‘dark’ ? ‘light’ : ‘dark’; localStorage.setItem(‘data-mode’, newMode); applySavedMode(); }); }); applySavedMode(); }); function applySavedMode() { const…

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