php - Wordpress specific post that leads to specific page -


i have "blog" page on website. thing have looped list of posts on "blog" page. every post has button 'read more'. need when click on button 'read more' should open "blog inner page" has custom styled template (that may set in admin panel) can read more information current post. technicaly should like, when create new post-page should create new post short information on "blog" page or vise-versa.

firstly read more button should called : needs add in functions.php file

// changing excerpt more    function new_excerpt_more($more) {    global $post;    return '… <a href="'. get_permalink($post->id) . '">' . 'read more &raquo;' . '</a>';    }    add_filter('excerpt_more', 'new_excerpt_more'); 

the above code automatically adds read more link post complete post content.

also, can try current setup : echo get_permalink();


Comments

Popular posts from this blog

PHP and MySQL WP -

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

go - golang pprof for c library code -