I have in the theme file single.php a link in it (example/cars/?aff=) in each post of my blog is displayed. That's how I integrated it:
$html .="<a id='test' rel='nofollow' href='/?aff=' target='_blank'>";
I would like the title of the post to be automatically written behind ?aff=
For example: /?aff=POSTTITLE
How do I accomplish this? Have googled allot but cannot find anything.
Would be glad about help!
Regards
I have in the theme file single.php a link in it (example/cars/?aff=) in each post of my blog is displayed. That's how I integrated it:
$html .="<a id='test' rel='nofollow' href='https://example/cars/?aff=' target='_blank'>";
I would like the title of the post to be automatically written behind ?aff=
For example: https://example/cars/?aff=POSTTITLE
How do I accomplish this? Have googled allot but cannot find anything.
Would be glad about help!
Regards
Share Improve this question edited Dec 7, 2019 at 13:51 Elgoots 1626 bronze badges asked Dec 7, 2019 at 9:22 MikeMike 11 bronze badge1 Answer
Reset to default 0I think this is what you are trying to accomplish?
$html .="<a id='test' rel='nofollow' href='https://example/cars/?aff='". echo get_the_title( $post_id ) ." target='_blank'>";
发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744930110a4601684.html
评论列表(0条)