All Collections
Tweak a stock theme or page template
Finding and changing text in your theme file
Finding and changing text in your theme file

Is there something that you can't change in the control panel? Here's how to find it!

Updated over a week ago

Some website text is ‘hard coded’ into your NationBuilder theme and you are not able to change it in the control panel. You have total control over everything if you can find it in your theme!

Here’s an example of how you can locate and change text.

On a survey page in the “Action” theme it says ‘Thanks for answering all our questions!’ at the completion of the survey like this:

I want to change that specific text to something else.

Here is a step by step:

1. Find where the text lives in the code with ‘Inspect’ in your browser.

  • Right click on the page and go to ‘Inspect’ - this example is with Google Chrome.

  • Hit the arrow button at the top of the code and then click on your site to see the text highlighted.

  • Find the style sheet or file that the text lives in - it will be the last code above the part you want to change that is gray and starts and ends with <!-- -->. This one happens to be right above the text.

📌 Note: Everything in the code in white will show up on your site as text.

2. Locate the theme file that needs to be changed in your custom theme.

  • Navigate to Website > Theme and you'll see if you have a custom theme or not - in this case we need to create one. When I click on 'Create Theme' on the next page I will clone my current theme and work from there. It really can take up to 10 minutes so please be patient.

  • Two places to look are the Templates and Files in your custom theme.

  • The file I was looking for by searching through the Templates (there are a lot) using 'control F' on my computer. Once clicked it will open the file.

3. Find what you want to change and make the change.

  • Remember how everything in white is the text on your website? That will help now! I'm looking for white text that says 'Thanks for answering all our questions!'

  • Here it is on line 57!

  • Change the the text and click on 'Save and publish changes'.

📌 Note: If you want to remove an entire section of code and not just change text remove everything inside the after the previous {% endif %} and including the last {% endif %}.

  • Refresh your page and we're done!

📌 Note: This will make the change across all survey pages in your nation.

Did this answer your question?