Categories
Blogs Free Open Source Software (FOSS) Free to use Wordpress

Adding Functions in WordPress Without Themes Editor

Kelebihan menggunakan plugin tersebut, apabila kita ada update themes, maka script function-nya tidak akan tertimpa oleh update-an themes terbaru. Tanpa plugin itu, biasanya selalu tertimpa, dan kita perlu masukkan kembali kode ke function.php

In general, wordpress allows web admins to edit themes, usually a special function change is done in function.php. However, sometimes this editing feature is an entry point for hackers. So for the sake of hardening wordpress security, one of them is by turning off the themes / plugin editor feature.

For those who need to add something to function.php, you can go through the intermediary plugin https://wordpress.org/plugins/my-custom-functions/

We just need to enter the php script in the plugin’s menu.

The advantage of using this plugin is that if we update the themes, the script function will not be overwritten by the latest themes updates. Without that plugin, it’s usually always overwritten, and we need to re-enter the code into function.php

Example of editing the login form

in the Username or Email Address section

enter the script:

add_filter (‘gettext’, ‘register_text’);

add_filter (‘ngettext’, ‘register_text’);

function register_text ($ translated) {$ translated = str_ireplace (‘Username or Email Address’, ‘Your Custom Text / Fill As You Wish’, $ translated); return $ translated; }

An example of the results I changed was on the Tel-U student blog login page https://student.telkomuniversity.ac.id/wp-login.php

Leave a Reply

Your email address will not be published. Required fields are marked *

Discover more from Just Shared on Tel-U

Subscribe now to keep reading and get access to the full archive.

Continue reading