Adding some PHP code to mylisting theme on WP

UKSEO2022

Power Member
Joined
Dec 17, 2021
Messages
539
Reaction score
234
I have a code to enhance the url structure of geograhies in mylisting theme. very annoyingly the seller of the code wants me to use WPCODEBOX, which i am sure is due to him probably getting a kick back, at $60 a site to simply inject some PHP its taking the pee. I guess I add it to the functions.php

https://mylisting.club/add-ons/enhanced-region-permalinks/
Anyone havbe any idea? or suggest an alternative that doesnt cost anything to WPCODEBOX
 
There’s absolutely no need to use a paid plugin like WPCODEBOX for this task. You can safely add the PHP code either to the functions.php file or, for a more modular solution, create a custom plugin. Make sure to use CHILD THEME in wp ;)
 
I have a code to enhance the url structure of geograhies in mylisting theme. very annoyingly the seller of the code wants me to use WPCODEBOX, which i am sure is due to him probably getting a kick back, at $60 a site to simply inject some PHP its taking the pee. I guess I add it to the functions.php

https://mylisting.club/add-ons/enhanced-region-permalinks/
Anyone havbe any idea? or suggest an alternative that doesnt cost anything to WPCODEBOX
You can indeed add the PHP code directly to the functions.php file of your theme to enhance the URL structure, bypassing the need for WPCODEBOX. Just ensure you're using a child theme to avoid losing changes when updating the theme. Alternatively, you could use a plugin like "Code Snippets" to add custom PHP without editing files directly.
 
Code snippets plugin is good. I’ve used it before to add php code to a site.

Otherwise you can use functions.php but as described make sure you do this via child theme- just look at your current themes documentation for how to set up a child theme if you don’t already know. Then you basically just need a functions.php file in the child theme which will have just your php code in it I beleive.

That way, when your theme updates itself, your custom code won’t be overwritten.
 
Back
Top