WordPress.org

Support

Support » Plugins and Hacks » Display Posts Shortcode » [Resolved] [Plugin: Display Posts Shortcode] Making the title BOLD and adding …read more/ …more to the end

[Resolved] [Plugin: Display Posts Shortcode] Making the title BOLD and adding …read more/ …more to the end

  • Hi,

    Thanks for this great plugin, been looking all over, and this is perfect.

    I managed to get it configured with my theme, and put them into columns, so all good there.

    But, I wanted 2 things only to happen, one for the title of the post to be displayed in bold? As it just reads as part of the text at the moment, and the other, was that there is no link at the end of the excerpt? Like a …more or …read more link to the post. I know the image and the title are, but its quite confusing to visitors?

    Is there an easy shortcode I’m missing?

    Thanks in advance

    http://wordpress.org/extend/plugins/display-posts-shortcode/

Viewing 7 replies - 1 through 7 (of 7 total)
  • I second this request!

    RE: / read more link

    Go into your display-posts-shortcode/display-posts-shortcode.php in the plugin editor and make these changes:

    if ($include_excerpt) $excerpt = ‘ <span class=”excerpt”>’ . get_the_excerpt() . ‘</span>’;
    else $excerpt = ”;

    $more = ‘

    / read more ‘;

    $output = ‘<‘ . $inner_wrapper . ‘ class=”post”>’ . $title . $image . $date . $excerpt . $more .‘</’ . $inner_wrapper . ‘>’;

    $inner .= apply_filters( ‘display_posts_shortcode_output’, $output, $atts, $title, $image, $date, $excerpt, $more, $inner_wrapper );

    I added 2 br/ to the area to match my themes CSS but you may want to change this.

    Hope it helps.

    ack wordpress is converting my code to an actual read more link… here it is again

    $more = ‘

    <a.class=”more-link” href=”‘. get_permalink() .'”>/ read more ‘;

    but I added a period between the “a and class” so wp won’t convert it.

    ok still converts it

    $more = ‘<br/*><br/*><a**class=”more-link” href=”‘. get_permalink() .'”>/ read more </a*>’;

    remove the astricks and the ** should be one space.

    Plugin Author Bill Erickson

    @billerickson

    As described in the plugin’s documentation, the solution provided by liarphoto is NOT the proper way to modify the output. Use the output filter instead.

    In your theme’s functions.php file or a core functionality plugin, place this: http://www.billerickson.net/code/add-read-more-to-display-posts-shortcode/

    Thanks both for the help.

    It doesn’t solve my problem though.

    I can’t find the documentation either, so am in the dark about what it has in there.

    When I did this, it added the read more into the page, but the title of the page still isn’t bold, and it also wraps around the image instead of having its separate line?

    When I added the read more code it worked as I say, but then I added another shortcode to see if it would bold the title on a separate line and it ended up with an error on the functions page :/

    I’ve also noted that it adds a bullet point in front of each column in certain themes, don’t suppose this can be stopped.

    I imagine that these are all noted in the documentation, but alas I haven’t found that yet

    Thanks

    Plugin Author Bill Erickson

    @billerickson

    The documentation is on the plugin’s homepage ( http://wordpress.org/extend/plugins/display-posts-shortcode/ ). It’s all the text describing how to use the plugin. Towards the bottom it describes how to customize the plugin using code.

    And here’s a long list of examples: http://www.billerickson.net/code-tag/display-posts-shortcode/

    All the issues you describe are to be solved using CSS. The plugin simply outputs the content, it is your job to make it look the way you want.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] [Plugin: Display Posts Shortcode] Making the title BOLD and adding …read more/ …more to the end’ is closed to new replies.
Skip to toolbar