WordPress.org

Forums

accessing code for front page (3 posts)

  1. oldtrojan66
    Member
    Posted 1 year ago #

    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?

  2. webbrewers
    Member
    Posted 1 year ago #

    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.

  3. WPyogi
    Forum Moderator
    Posted 1 year ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.