• Resolved obedyeboah

    (@obedyeboah)


    [ Moderator note: de-capped. Don’t do that, it’s like you are yelling at us. ]

    i am trying to get the post in the categories to show up with just a preview of the post and a read more button at the end. the entire articles are showing which is really annoying. the only time the entire article should display is when the person clicks read more or a hyperlink that directs the person to post.

    i have tried all the suggestions but still is not working maybe i am doing something wrong.

    my website is
    edifyus.co

    please help

Viewing 9 replies - 16 through 24 (of 24 total)
  • Thread Starter obedyeboah

    (@obedyeboah)

    Hi Kathryn here is the link.

    I did exactly what you instructed

    http://pastebin.com/B4jnV3y9

    Moderator Kathryn Presner

    (@zoonini)

    Thanks for the Pastebin. Your file includes only one function to set up your child theme’s stylesheet. There isn’t any code relating to excerpts, so that’s the first thing I’d suggest double-checking before we go further.

    Thread Starter obedyeboah

    (@obedyeboah)

    I have already done that. Where I change the it in content.php. I used one of the example you gave to someone one this forum

    I have also set up my child theme

    Moderator Kathryn Presner

    (@zoonini)

    Ah, I think I see the problem. This is the function you actually want:

    function new_excerpt_more($more) {
           global $post;
    	return '<a class="moretag" href="'. get_permalink($post->ID) . '"> Read More</a>';
    }
    add_filter('excerpt_more', 'new_excerpt_more');

    The orignial one modifies the “Read more” link only when the link is already present, which isn’t the case here. Give it a try in your child theme and let me know if it does the trick.

    Thread Starter obedyeboah

    (@obedyeboah)

    Okay. So just to verify. I should copy and paste the code you just provided into my function.php?

    Moderator Kathryn Presner

    (@zoonini)

    Correct, copy and paste the code I provided into your child theme’s functions.php, below what’s already there.

    Thread Starter obedyeboah

    (@obedyeboah)

    Thank you so much for the help. It worked

    Moderator Kathryn Presner

    (@zoonini)

    Great, glad you’re set.

    Thread Starter obedyeboah

    (@obedyeboah)

    Hi Kathryn. I’ve made a new post about an issue for some days. Is it possible for you to take a look please.

    Thank you.

Viewing 9 replies - 16 through 24 (of 24 total)
  • The topic ‘post to in catergory to show up in preview format with read more button’ is closed to new replies.