Trying to modify my wordpress theme

Discussion in 'HTML, CSS & JavaScript' started by JamesAus, Jun 5, 2017.

  1. JamesAus

    JamesAus Aspirant

    I'm needing to modify my wordpress theme on the homepage ( to add some text under the following html:

    <img src="" width="298" height="339" alt="image description">
    <a href="" class="btn btn-play">PLAY A GAME</a>
    Ironically enough, I thought it would be easy, but I can't find where to make the change. I've downloaded all my theme files and done a search for btn-play but it only appears in the css files.

    Does anyone have any tips on how I can find the spot to modify?

    Thank you.
  2. Jim McClain

    Jim McClain Senior Citizen

    It's not your WordPress theme that needs to be edited, it's the widget you are using in the theme. Did that widget come with the theme? Is the widget editable, or is it a hard-coded widget that only has a save an/or a remove/delete button?

    Where are you trying to add text? If you are adding text to the button, you risk the chance the button will be too big or look odd. If you want to add text below the button and the graphic, then you will either have to have the ability to edit the widget HTML within the widget interface, or recreate the graphic and button using the Text widget.

    Never modify theme files directly. On the next update, your modifications will be replaced by the new file. You should be doing your modifications to a child theme, which normally includes a blank style.css file and a truncated functions.php file. Both of these files you can add code to for various purposes. Many themes also come with a customizer that allows you to add "additional CSS" in place of adding to a child theme's style.css. Those additions, along with other theme customizations, will be retained after an update. They are there for those who do not want to deal with a child theme.

  3. JamesAus

    JamesAus Aspirant

    Hi Jim, thanks very much for your detailed response.
    With the information you've provided, I've managed to work it out :)
Draft saved Draft deleted