admin管理员组文章数量:1410730
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'>";
本文标签: Post title as link parameter
版权声明:本文标题:Post title as link parameter 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744930109a2632846.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论