php - Wordpress matching page title to pull up tagged stories -


I'm trying to create a custom page template in WordPress, where title = cars, this will pull the latest stories Related

this is the line with which I need help;

   Div class = "topposts" & gt; & Lt ;? Php query_posts ('tag = $ page_title & showposts = 3'); ? & Gt; & Lt ;? Php while (is_pause ()): the_post (); ? & Gt; & Lt; Li & gt; & Lt ;? Php woo_get_image ('image', '165', '115', 'thumbnail', 90, $ post- & gt; id, 'img'); ? & Gt; & Lt; H3 & gt; & Lt; A href = "& lt ;? php the_ermelink () ;? & gt;" & Gt; & Lt ;? Php the_title (); ? & Gt; & Lt; / A & gt; & Lt; / H3 & gt; & Lt ;? Php echo excerpt (20); ? & Gt; & Lt; / li & gt; & Lt ;? Php timeline; ? & Gt; & Lt; / Div & gt; Basic PHP syntax:  ' -String string     

No variable:
  & lt ;? Php query_posts ('tag = $ page_title & showposts = 3'); ? & Gt; ^ --------------------------- ^ ---   

Say you look at WP For the tags whose characters are literal characters, try $ , p , a , etc ...

  & lt ;? Php query_posts ("tag = $ page_title & showposts = 3"); ? & Gt; Instead - ^ --------------------------- ^ -   

.

Comments

Popular posts from this blog

php - PDO bindParam() fatal error -

logging - How can I log both the Request.InputStream and Response.OutputStream traffic in my ASP.NET MVC3 Application for specific Actions? -

java - Why my included JSP file won't get processed correctly? -