最近我需要有关permalink短代码的帮助
function my_permalink(){
ob_start();
the_permalink();
return ob_get_flush();}
add_shortcode(\'my_permalink\',\'my_permalink\');
为此,我得到了一个短代码[我的permalink],它工作得很好
But the problem is when I use this shortcode on my WordPress Posts, Pages, CPT, CT or any custom Archive Page it shows me some unnecessary link text which is at top of the loop and also it does not include any HTML tag
我正在显示截图和帖子中出现的链接位置
代码:
</div>
<div class="entry-content">
https://careerfeed.net/jobs/kfri-recruitment-2021-for-1-project-assistant/<div class="wprt-container"><p>KFRI Recruitment 2021 for 1 Project Assistant Applications are invited from eligible candidates for the post of one <b>Project Assistant </b>under the project KFRI/RP 823/2021 entitled “Ecological studies on post restoration success of threatened plants in situ.”</p>
https://careerfeed.net/jobs/kfri-recruitment-2021-for-1-project-assistant/
<p> </p>
屏幕截图:URL显示:
https://prnt.sc/15jcg6d
我只是粘贴了短代码:
https://prnt.sc/15jckza
内部检查元件:
https://prnt.sc/15jct1q