Category Archives: Code

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…

Without plugins!Contact Form 7 How to load js and css only on specified pages.|WordPress

Learn how to make ContactForm7 js and css load only on specified pages in WordPress without using a plugin. Normally, when ContactForm7 is installed, js and css are loaded on every page, which slows down the display speed, but this can be prevented by using this method. Edit functions.php. If a child theme is available,…

Without plugins!How to implement SEO features.|WordPress

Learn how to introduce policy features in WordPress without using a plugin. Plug-in non-use has various advantages, such as reducing server load and maintaining site display speed. There are many diverse plugins for WordPress, and for SEO, there are excellent plugins such as All in One SEO Pack and Yoast SEO. However, SEO plug-ins are…

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. The reasons are as follows. Light. Many languages handled. Flexible.(Various customisations are possible.) Easy to…

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