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

Die besten Black Friday Deals 2026 für Webdesign & Webentwicklung

Jedes Jahr im November stehen die gleichen Fragen im Raum: Welche Software-Lizenzen, Hosting-Pakete und KI-Tools lohnen sich wirklich? Als Unternehmer und Webdesigner optimiere ich meinen …

PHP2Shell: Kritische RCE-Sicherheitslücke bedroht Millionen Webseiten – Was du jetzt sofort tun musst

Stell dir vor: Deine Webseite ist auf dem neuesten Stand, deine Plugins sind frisch aktualisiert, die Sicherheits-Tools schlagen keinen Alarm und trotzdem klafft auf Server-Ebene …