Having Trouble With Customized Read More Link
-
I’ve styled my read more links as buttons but am having trouble making them right. I suspect the problem is with my php which I am pretty terrible with.
My problem is this..
<a class="more-link" href="https://www.mywebsite.zsz/mypost/"> <div class="read-more-class">View Full Post</div> </a> <p> <a class="more-link" href="https://www.mywebsite.zsz/mypost/"></a> </p>
As you can see there are two links to the post and a div inside the first one.
What I want to do is put the post link inside the a href which will be inside the div so that the html will look like this..
<div class="read-more-class"><a href="https://www.mywebsite.zsz/mypost/">View Full Post</a></div>
Also, I have no idea where this more-class class is coming from and would, if possible, like to get rid of it.
Here is what I did in functions.php to get the result I’m seeing now..
/** * Returns a "Continue Reading" link for excerpts * * @since Twenty Ten 1.0 * @return string "Continue Reading" link */ function twentyten_continue_reading_link() { return '<div class="read-more-class"><a href="'. get_permalink() . '">' . __( 'View Full Post', 'twentyten' ) . '</a></div>'; }
It should be noted what I have now has worked for months, the browsers don’t mind it but I am unable to properly style the link colour and underline as it takes the css styling from elsewhere.
Any advice is greatly appreciated ??
- The topic ‘Having Trouble With Customized Read More Link’ is closed to new replies.