• cjg

    (@cjg)


    Hello all
    I need help on php. I put google adsense on some of my post. The post look fine but if you go to categories you see the code. I don’t know where to find the archive php file on wordpress so I can insert the right code.
    All help is greatly appreciated
    thanks to all

Viewing 12 replies - 1 through 12 (of 12 total)
  • Michael

    (@alchymyth)

    archive.php should be in the folder of your theme ( /wp-content/themes/your_theme/ ), besides the other php files.
    the issue is that the archive is probably using ‘the_excerpt()’ to show the short form of the post (and that is probably not clearing out the adsense code)
    if you have located archive.php, edit the_excerpt() into the_content('read more')

    Thread Starter cjg

    (@cjg)

    thanks for the help will try to do that not a tech and the tech side gives me problems.
    thanks again

    Thread Starter cjg

    (@cjg)

    I hate to bother you again but I went to my cpanel and then to file manger I can’t find the archive php. I looked in the theme but still couldn’t find it. I know this must seem simple to you but it is kicking my butt.
    Thanks for your help

    hiitsaaron

    (@hiitsaaron)

    Go to Site Admin, or ‘yoursite.com/wp-admin’, then on the left menu go from Appearance > Editor, on the right you should see ‘Archives’ – click on it, and you can edit it there..

    Thread Starter cjg

    (@cjg)

    thanks I’ll try that
    thanks again

    Thread Starter cjg

    (@cjg)

    I’m in there now but there is no archive php.
    It says theme files templates there are a lot of files but no archive.
    sorry but I’m trying
    thanks for the help

    esmi

    (@esmi)

    Make a copy of your theme’s index.php file and name this new copy archive.php.

    Thread Starter cjg

    (@cjg)

    ok after I do that how do I fix my problem?

    esmi

    (@esmi)

    Try following alchymyth’s suggestion above.

    Thread Starter cjg

    (@cjg)

    thank you

    Thread Starter cjg

    (@cjg)

    one more question then I’ll leave you alone. I found where it said what
    alchymyth said can I just chane it in the index php or do I have to make a new folder?

    You can replace the_excerpt() with the_content() in your theme’s index,.php file directly.

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘archive php’ is closed to new replies.