I am creating a theme on wordpress with Bootstrap CDN. I created a button as:
<div class="col-md-4"><a href="<?php echo get_permalink(); ?>"
class="btn btn-lg btn-block">Read Latest</a></div>
It displays link as button and when I click it, url bar displays the link that should be opened, but page doesn't open. I know this is a very noob question but I'm stuck, any help is appreciated.
Thanks!
Update: The Resulting html link to the php I used is: http://localhost/baatega/bad-day-eh/
First, I don't quite understand the issue - the link is not correct? or what? Could you paste here please print screen or reproduce the issue in jsFiddle? It's more or less question for the WordPress development forum here, however if it's the case of link:
get_permalink();
is used within the Loop. (if not, you have to pass the ID as an argument to it)esc_url( get_permalink() );
Have a look here: https://developer.wordpress.org/reference/functions/get_permalink/