It’s widely acknowledged that Large Language Models are having a significant impact and cause disruption, and indeed many tech luminaries are calling for controls. Used correctly it can be used to give useful advice on everything from code to legal advice, but the risks are significant. Today we explore how it can be used by non-technical managers to understand a technical discussion.
We use an actual example of a change that was made in the theme of a production server, which in turn triggered an alert on a High Performance WordPress server. It was difficult for the owner of the website to figure out conflicting advice from the server manager, who said it shouldn’t be done, and the contracted Website Designers, so we explore how the topic might be explored by a non-expert, in this case the owner of the website in question.
Is making changes direct changes to the theme file in WordPress a good practice?
Making direct changes to the theme files in WordPress is generally not considered a good practice. Here’s why:
- Theme Updates: When you modify the theme files directly, you’ll lose those changes when you update the theme. Updating your theme is important for security fixes, bug patches, and new features. If you’ve made direct changes, you’ll need to redo them after every update, which can be time-consuming and error-prone.
- Compatibility Issues: Directly modifying theme files can lead to compatibility issues with future updates, plugins, or WordPress itself. If a plugin or a new version of WordPress relies on specific functions or hooks that you’ve modified or removed, it can break your website or cause unexpected behavior.
- Maintenance: Custom changes in theme files can make it harder to maintain your website. It becomes difficult to troubleshoot issues, track down bugs, or collaborate with other developers if the modifications are scattered throughout the theme files.
- Child Themes: WordPress provides a recommended solution for making customizations called child themes. Child themes inherit the functionality and styling of the parent theme while allowing you to make custom changes in a separate set of files. This way, you can update the parent theme without losing your modifications.
Instead of directly modifying the theme files, it’s better to follow these best practices:
- Child Themes: Create a child theme and make your modifications in the child theme’s files. This ensures that your changes are preserved during theme updates.
- Custom CSS: Most themes provide options to add custom CSS code without modifying the theme files. Use this feature to add your CSS modifications.
- Custom Functions: For functional changes, use custom functions by creating a plugin or using a functionality plugin. This allows you to add or modify functionality without touching the theme files.
By following these practices, you can maintain a stable and updatable WordPress website while preserving your customizations.
A developer was advised of this after changes to a theme file were detected in an alert in production and this was the response. Evaluate if the issue is understood and likely to be solved:
The Developer: It’s known by our team that new code pieces are always added to the child theme but in the case of https://website here/ the website didn’t have a child theme We also didn’t want to add a new plugin for this task such as Insert Headers and Footers without taking a backup as you probably know that this could cause a plugin conflict, so this was added to the header of the page. Is the script causing any issues to the website? If so, we can remove the script and you can get in touch with your theme provider and your theme to safely add a child theme.
Based on the response provided, it seems like the developer understands the potential issues associated with directly modifying the theme file and acknowledges the best practice of using a child theme. However, they state that a child theme was not present for the website in question.
The developer’s response also mentions concerns about adding a new plugin for this specific task due to potential conflicts and the decision to add the script directly to the header of the page instead.
Considering this information, it appears that the developer is aware of the problem and the recommended solution. They suggest removing the script and advise reaching out to the theme provider to safely add a child theme.
To evaluate if the issue is likely to be solved, it would be necessary to understand the actions that will be taken moving forward. If the developer proceeds with removing the script and actively helps implement a child theme or suggests alternative solutions to achieve the desired functionality without modifying the theme files directly, then the issue is likely to be addressed properly.
However, if no further steps are taken to rectify the situation or if the developer continues to make direct modifications without considering the potential consequences, it indicates a lack of understanding or disregard for best practices, which could lead to ongoing issues and complications in the future.
Is adding a child theme to do modifications something a competent WordPress developer can reasonably be expected to achieve?
Yes, adding a child theme to make modifications is a task that a competent WordPress developer should be able to achieve. Creating and implementing a child theme is a standard and widely accepted practice in WordPress development.
A child theme is essentially a separate theme that inherits the functionality and styling of its parent theme while allowing for customizations. It involves creating a new directory, creating a stylesheet (style.css) with appropriate information and importing the parent theme’s styles, and adding custom template files or functions as needed. The process is well-documented and straightforward, and there are numerous tutorials, guides, and resources available online to assist developers in creating child themes.
Competent WordPress developers are typically familiar with the concept of child themes and understand the importance of using them to preserve modifications while allowing for future updates and maintainability. They should have the knowledge and experience to set up a child theme, migrate existing modifications to the child theme, and ensure that the website functions correctly with the new child theme in place.
However, it’s important to note that the ability to create a child theme may vary depending on the individual developer’s experience and expertise. Some developers may have more specialized skills or focus on other aspects of WordPress development, while others may have a broader skill set that includes theme development and customization. It’s always a good idea to evaluate a developer’s specific experience and portfolio to ensure they have the necessary competency in WordPress theme development and child theme implementation.
Analysis of performance
It was possible to get correct answers in non-technical language, and the LLM was able to bring clarity to the technical aspects, with some basic questions and cut and paste from the expert responses. It’s possible to see that a child theme should be used, and that it’s straightforward and a reasonable thing to ask as part of a WP customisation project. So what about the impact, should we be expecting the LLM to make strategic decisions and take over project management? No, but used today by a non-expert it can certainly be used to evaluate the assertions that experts do make, and to check them against what’s reasonable. This will have far reaching effects, enabling better decision making on the part of Product Owners and increased ability to avoid known software anti-patterns by more effectively understanding the technical context.