I’m as green as they come as regards to PHP language. Now I took upon the task to start learning PHP and Joomla.
Here’s where I get stuck all the time:
I have a certain piece of html that I need to change, for example I need to remove a class from a tag. By using inspect element in Chrome I can find the piece of code and I can even test-change it right there in Chrome and have it do what I need.
But how do I move from there into locating this same piece of html in the Joomla template? Do I need to manually browse trough each file and search for the string or is there a smarter way of finding out what file is responsible for inserting that html string into the site?
The best way to do this if to do a template override.
You class is coming from a module so you will need to override the layout of the module. It’s very simple. Here is the documentation on how to do it.
In your template folder, there should be a folder called “html”. If not, create one.
Once done, create a new folder which is the same name as your module folder, so it should be something like mod_art-box. Then in the root of your Joomla site, go to modules/mod_art-box/tmpl and copy the default.php from there to the folder you created before. Then open the file, search for the class and remove it.
The reason I suggest doing a template override is because if the extension or Joomla itself is updated, then it will override your changes, making you have to do it again. Template overrides are not overridden.
Hope this helps