WordPress.org

Ready to get started?Download WordPress

Forums

post id in "continue reading" (3 posts)

  1. mbs1337
    Member
    Posted 1 year ago #

    Hello there.

    I have a problem i hope some guys can help me with.

    Using the "origami" theme in WordPress, and i want to get a "More" or "Continue reading" link on my posts.

    Right now it's working very well. Found a solution in this forum, but it's not all good.

    Right now the end of the post, it's printing: "Read more hereā€¦"
    I want it to print "Read more about: POST ID"

    If i have a post that have a title like: "How do you cock rise without burning" it hasto be "Read more about: How do you cock rise without burning" - and then of cause a link to the post (but that is working right now)

    I have this code on my site in functions.php

    function new_excerpt_more($more) { global $post; return ' <a href="'. get_permalink($post->ID) . '">Read more here... </a>';}add_filter('excerpt_more', 'new_excerpt_more');function custom_excerpt_length( $length ) { return 120;}add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    try:

    function new_excerpt_more($more) { global $post; return ' <a href="'. get_permalink($post->ID) . '">Read more about: '.get_the_title($post->ID).'</a>';}add_filter('excerpt_more', 'new_excerpt_more');function custom_excerpt_length( $length ) { return 120;}add_filter( 'excerpt_length', 'custom_excerpt_length', 999 );

    http://codex.wordpress.org/Function_Reference/get_the_title

  3. mbs1337
    Member
    Posted 1 year ago #

    Ahhh :)

    Thanks alot!!! That helped me.

    Best Regards
    Michael Bay

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.