Php help
-
I am new to wordpress and I am trying to insert some php in my head template. What I hope to do is when the home page is live place a custom meta description in the page. If the home page is not live I want no meta description becasue the xfish_meta plug I use will control these pages. This is what I have currently:
<?php if ( is_home() ) {?>
<meta name=”description” content=”<?php if ( is_home() ) {
bloginfo(‘name’); echo ” – “; bloginfo(‘description’);
}}
?>” />This is working fine on the home page, but when I go to an individual post it leaves the “/> which I do not want. Can anyone help me fix this?
Here is my test page:
Home Page: https://degmsb0.tollfreepage.comIndividual post with problem: https://degmsb0.tollfreepage.com/?p=20
Thank you.
- The topic ‘Php help’ is closed to new replies.