A better way to write code
-
Hi
I have had a certain amount of success in writing the backend code for database search query.
The code, which is a mixture of PHP and HTML allows the user to enter a search tern, and then the result are displayed.
To do this, I have one function, and an associated short code.
So I place the short code on the WordPress page, I place my function in my own function file and folder, and I include the shortcode information in the functions.php.
So everything works, but I know this is not the ideal was to do things.
I don’t fully understand loops etc., but I know there are certain times/places where you should hook into the main WordPress code.
So my question is: Can anyone explain to me, in simple terms, if there is a better / more preferred way of achieving this functionality?
Thank you
Garrett
The topic ‘A better way to write code’ is closed to new replies.