WordPress.org

Support

Support » How-To and Troubleshooting » accessing code for front page

accessing code for front page

  • oldtrojan66

    @oldtrojan66

    I thought by clicking on the text tab on the edit portion of my dashboard, that would access the code. I’m trying to add Google Analytics to my web site. After this is done and I look at the page again, it has all the script I had there before, plus the code written and pasted. I don’t think this should look this way. Can someone help an old guy who’s in way over his head?

Viewing 2 replies - 1 through 2 (of 2 total)
  • webbrewers

    @webbrewers

    Some themes have an option to add scripts like analytics globally so they are on every page. Look under theme options….or you could get a plug in that will do the same thing.

    WPyogi

    @wpyogi

    Forum Moderator

    I thought by clicking on the text tab on the edit portion of my dashboard, that would access the code.

    Dynamic websites like WP generate the code from several places – WP core, theme files, plugins and your content. So what you see in the text editor isn’t what shows up in a browser or in View Source.

    Google Analytics would need to be added to a header.php file – but if you modify theme files like that, your changes will be lost when the theme is updated. To avoid that, a child theme would be the way to go – http://codex.wordpress.org/Child_Themes

    But, as suggested above, a plugin (or some themes have options) would be a much easier way to go – here’s one possibility:

    http://wordpress.org/plugins/googleanalytics/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘accessing code for front page’ is closed to new replies.
Skip to toolbar