How to edit php file to show page titles????

Discussion in 'PHP' started by schoie1981, Jan 20, 2010.

  1. #1
    Hi,

    Just wondered if anyone knew how to edit the css or a php file to get my page titles showin again for my homepage.. for some random reason its stopped showing em when i click on my webiste in the search engines.. also its effecting my Search engine results an its not showin up on there too

    any clues???
     
    schoie1981, Jan 20, 2010 IP
  2. WebWorth

    WebWorth Greenhorn

    Messages:
    89
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    20
    #2
    Not sure what you mean by "get the page title"

    in your php page you could have the title as a var in php

    eg

    <head>
    
    <title><?php echo $phpvar;?></title>
    </head>
    PHP:
    obviously if the $ var is blank then th title will be blank

    Thanks
    Rob
     
    WebWorth, Jan 20, 2010 IP
  3. schoie1981

    schoie1981 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Well im using webasyst shopping cart an ive always put in my pages titles in backend of my website an they've always shown up in front end... but for some reason theyve stopped showin up now! as i noticed in google search results! but tryin to pin point what ive done to mess it up.. all i did was go into the css an try to turn off some categories but i must of deleted something??! :confused:

    so was just wondering if anyone could help me retify it??
     
    schoie1981, Jan 20, 2010 IP
  4. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Without seeing your code, how are we supposed to help? You need to at least show where it's supposed to show the title:rolleyes: And it won't be some "random" reason. All code works logically, so there will be a rational reason for it, 99% of the time its down to user error
     
    JAY6390, Jan 20, 2010 IP
  5. schoie1981

    schoie1981 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Hi,

    good point! sorry im new to all this!

    Where shall i copy the code from... the css file?? would that have anything to do with page titles???
     
    schoie1981, Jan 20, 2010 IP
  6. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #6
    When you say "page title" do you mean the title that is in the windows titlebar or is it a title on the actual page?
    If you copy and paste both the css and the php file it should be easily solved
    edit: if you have a link to the site even better
     
    JAY6390, Jan 20, 2010 IP
  7. schoie1981

    schoie1981 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yeh the one that is in the windows title bar an which shows up in googles search results!

    My website is sportive - supplements .co . uk

    have a quick look
     
    schoie1981, Jan 20, 2010 IP
  8. JAY6390

    JAY6390 Peon

    Messages:
    918
    Likes Received:
    31
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Its got the title "HomepageBanner" and there is indeed a <title> tag with that in it. The problem is that you've got two html pages, one inside the other. If you look at the source code, you will see that the original code has a "head" section but no <title> tags. If you have a backup of the site I would highly recommend reverting back to a point where you know it was all fine. This isn't anything to do with css I can assure you. I'm guessing you're using some pre-built software with templates
     
    JAY6390, Jan 20, 2010 IP
  9. schoie1981

    schoie1981 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Oh ok... thanks for that, what a great help!

    I dont understand how i could of got 2 html pages inside each other!

    How this came about is i tried puttin a pull down menu on as a navigation as apposed to a categorie tree an i tried insertin the code it said into the head section etc where it said.. wonder if i took that out it might work again?!??!?!

    An yes im using a pre-built software - Called... Shop-script / Webasyst
     
    schoie1981, Jan 20, 2010 IP
  10. schoie1981

    schoie1981 Peon

    Messages:
    12
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Think ive sorted it... Thank you sooo much!! really appreciate you spendin time to have a look! Your a genius! ;o)

    Mark
     
    schoie1981, Jan 20, 2010 IP