wordpress functions.php bearbeiten

How to add code via the „functions.php“ file?

In many tutorials, for various customizations of his WordPress website is indicated to insert a certain code in the file „functions.php“. But how do you actually do that?

How do I find and edit the „functions.php“ file?

There are several possibilities:

Option 1: In the WordPress backend

Log in to your WordPress backend as administrator.In the menu item „Design“ you will find the sub-item „Theme file editor“. In the right column, select the file „Theme functions“ (functions.php) and you can insert the code in the editor.

The only problem: You save something in this file of a theme. If the manufacturer of the theme offers an update, in which also this file is updated, then your inserted code in this file is lost.

Daher: Mach deine Änderungen in einem ein Child-Theme!

Option 2: Via FTP

If you don’t have permissions in the wordpress backend, you can also download the file via FTP, edit it and upload it again.

How to do that?
With a FTP client like FileZilla or CyberDuck you can connect to the FTP access data of your hoster. There you will see all files of your WordPress installation. In the folder /wp-content/themes/ you will find the installed themes. Open the folder with the name of your theme and there you will find the file functions.php. You can now download this file, edit it in a code editor of your choice – just add the code mentioned above to the bottom of the file – and then upload it again.

Option 3: With a code-embed plugin

I am not a friend of unnecessary additional plugins, so I mention this way only at the end. But if you didn’t manage to use the two ways above, you can easily install a plugin like My Custom Functions to insert the code.

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert

Weitere Artikel

So steigerst du nachhaltig die Sichtbarkeit deiner Webseite mit regelmäßigem Blog-Content

Kennst Du das? Du hast eine tolle Webseite für Dein Unternehmen – vielleicht sogar professionell gestaltet und technisch perfekt optimiert – und seit dem Online-Start …

Webflow vs. WordPress: Der ewige Machtkampf unter Webdesignern – und was wirklich zählt

Kaum ein Thema spaltet die Webdesign-Community so sehr wie die Frage: Webflow oder WordPress?Fast jedes Mal, wenn ich durch LinkedIn oder Instagram scrolle, stolpere ich …