fbpx

Modification of free or paid WordPress themes

You successfully installed a free or paid WordPress theme according to your wishes and started to enter content – but suddenly you notice that something is bothering you: some articles require an additional image to be added in the head section, you do not want links to be underlined but to change colour, your logo is in the bottom section but you would like to add some text underneath… Problem: the author of the free theme does not care about modifications and the author of the paid theme has no time. What to do? In this article, we will show you how to correctly approach modifications of WordPress themes.

Modification of free or paid WordPress themes

The biggest mistake you can make when implementing modifications is to directly change the theme. If you update the modified theme, you lose all modifications and you have to implement them again. If you are thinking about simply not updating the modified theme, please read our article on how to protect your WordPress installation from hacks and you will quickly change your mind. The solution to still be able to update the theme and also use the modification is to use child themes.

How to create a child theme?

In the themes folder wp-content/themes/ you first have to create a subfolder that will contain files of the child theme. For an easier maintenance, it is recommended to name the folder by adding -child to the original theme name (e.g. ideaz-child). In the created folder, you will have to create at least two files: style.css and functions.php.

Theme Name: Ideaz child
Template: ideaz
Author: Digital Agency Ideaz
Description: Modificated Webpage of Ideaz Digital Agency
Version: 1.0 pre-alpha

<?php
function popravki_nadrejene_teme() {
wp_enqueue_style( ‘ideaz’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘ideaz-child’, get_stylesheet_directory_uri() . ‘/style.css’, array( ‘ideaz’ ));
}
add_action( ‘wp_enqueue_scripts’, ‘popravki_nadrejene_teme’ );
?>

Theme activation, adding modification and creating additional templates

If you performed the above steps correctly, the appearance menu should now show the option for activating the child theme. You can click on the preview and if everything is OK, you can activate it. Remember that after activation, you may have to recreate some menus. And now, after covering the easier part, comes the harder part: adding modifications.

Appearance modifications can be entered as CSS code in the style.css file; but be careful not to delete the head mentioned above. Core modification of the parent theme should be entered into the functions.php file; but remember that the functions.php file of the child theme loads before the same file of the parent theme. In both cases, you have to bear in mind that you are retyping the existing code or adding capabilities, which is why you should not copy all the content from the parent theme.

All the other template files (page.php, single.php, front-page.php, itd.) will be copied from the parent theme, which is why it is recommended to copy the file from the parent theme as a basis. You can also create own, specific template files that are not included in the original theme. For this purpose, see the WordPress guide on template hierarchy.

Do you require assistance?

Because of many guides available, adding modifications may seem simple but do not be deceived. Incorrectly written code can collapse the structure of the site or significantly slow down the loading time. An incorrectly inserted semicolon or curly bracket can take hours until you identify the error. Code copied from another source can cause unexpected bugs or safety vulnerability that you may not see, but criminals definitely will. Would you not rather invest the time spent on modifications in selling your product and/or developing new ideas on improving the product?

As a team with several years of experience in the field of WordPress theme development, we can implement any modification fast and transparently, while thoroughly testing the final site (for more details see our workflow). Contact us and we will surely find a way of providing the assistance you require.

How to test the quality of a website design?

How to test the quality of a website design?

You ordered s new website from a company that develops websites. The website was created in a relatively short period of time, they considered your wishes and the price was just below the amount you were prepared to pay. At first sight, the site looks good and because you lack the technical knowledge required for […]

Modification of free or paid WordPress themes

Modification of free or paid WordPress themes

You successfully installed a free or paid WordPress theme according to your wishes and started to enter content – but suddenly you notice that something is bothering you: some articles require an additional image to be added in the head section, you do not want links to be underlined but to change colour, your logo […]

Kako pohitriti spletišče Wordpress?

How to speed up your WordPress website?

Imagine a supermarket where products placed on shelves are covered with non-transparent covers with the name and a picture of the product and a button for opening the cover. This button, due to a non-optimised circuit, triggers an outdated and slow mechanism that takes a few seconds to lift the cover. Would you buy more […]