How to display post title in Wordpress? -
i'd generate wordpress post title in next javascript code: i'm placing code under content in wordpress posts.
<script charset="utf-8" type="text/javascript"> document.write('\x3cscript type="text/javascript" charset="utf-8" src="http://adn.ebay.com/cb?programid=1&campid=5337203820&toolid=10026&customid=posttop&keyword=**post-title**&width=728&height=90&font=1&textcolor=000000&linkcolor=0000aa&arrowcolor=8bbc01&color1=709aee&color2=[colortwo]&format=imagelink&contenttype=text_and_image&enablesearch=y&usepopularsearches=n&freeshipping=n&topratedseller=y&itemswithpaypal=n&descriptionsearch=n&showkwcatlink=n&excludecatid=&excludekeyword=&catid=177913%2c179767%2c1059&diswithin=200&ctx=n&autoscroll=n&flashenabled=' + isflashenabled + '&pagetitle=' + _epn__pagetitle + '&cachebuster=' + (math.floor(math.random() * 10000000 )) + '">\x3c/script>' );
the keyword= part of script need generate wordpress post title. trying keyword="<?php single_post_title(); ?>"
doesn't generate wordpress post title... not sure if i'm on right track or not.
any help appreciated. please remember i'm newbie. if forgot mention please ask. i'll quick respond.
thanks lot!
inside loop see if ( have_posts() )
, while
, utilize within while
statement.
$title= get_the_title();
now variable set, can utilize later unless overwritten.
in js:
keyword="<?php echo $title; ?>"
wordpress
No comments:
Post a Comment