admin管理员组文章数量:1415645
How can i make wordpress blog event titles clickable and direct to their respective post itself? Thank you!
<li id="post-<?php the_ID(); ?>" <?php post_class( 'stm_post_info' ); ?>>
<?php if( get_the_title() ): ?>
<h4 class="stripe_2"><?php the_title(); ?></h4>
<?php endif; ?>
How can i make wordpress blog event titles clickable and direct to their respective post itself? Thank you!
<li id="post-<?php the_ID(); ?>" <?php post_class( 'stm_post_info' ); ?>>
<?php if( get_the_title() ): ?>
<h4 class="stripe_2"><?php the_title(); ?></h4>
<?php endif; ?>
Share
Improve this question
edited Aug 23, 2019 at 12:32
fuxia♦
107k39 gold badges255 silver badges459 bronze badges
asked Aug 23, 2019 at 11:06
SamuelSamuel
31 bronze badge
2 Answers
Reset to default 0<li id="post-<?php the_ID(); ?>" <?php post_class( 'stm_post_info' ); ?>>
<?php if( get_the_title() ): ?>
<h4 class="stripe_2"><a href="<?php the_permalink() ?>" ><?php the_title(); ?></a></h4>
<?php endif; ?>
Please try this
You can also try below one :
<li id="post-<?php the_ID(); ?>" <?php post_class( 'stm_post_info' ); ?>>
<?php if( get_the_title() ): ?> <h4 class="stripe_2"><a href="<?php echo get_permalink($post->ID);?>" ><?php the_title(); ?></a></h4><?php endif; ?>
that is more specific with particular post
本文标签: How can i make wordpress blog title clickable and direct to the post itself
版权声明:本文标题:How can i make wordpress blog title clickable and direct to the post itself 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1745221667a2648423.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论