WordPress.org

Forums

[resolved] Linking to actual blog post from sidebar (4 posts)

  1. 4star
    Member
    Posted 6 years ago #

    I wanted the latest blog post to show in my front page sidebar i used the(the loop) and included

    <?php
    	$content = get_the_content('',FALSE,'');
    	$content = apply_filters('the_content', $content);
    	$content = str_replace(']]>', ']]>', $content);
    	echo substr($content,0,160);
    ?>&hellip;

    to shorten up the post. Now how can I include a read more link to the actual post? (not using the title permalink

  2. 4star
    Member
    Posted 6 years ago #

    Is there a code to link to the full (single.php) of the most recent post?

    The read more link wouldn't work since i'm only calling a few words on the sidebar...

  3. 4star
    Member
    Posted 6 years ago #

    Never mind i figured it out.

  4. tranceplant
    Member
    Posted 6 years ago #

    you know you should post the solution when you figure it out. Please

Topic Closed

This topic has been closed to new replies.

About this Topic