• Resolved amurphyatx

    (@amurphyatx)


    Hi, love this plugin– thank you, it’s great work.

    I’d really love for my post authors to also be displayed below the snippet.

    Wondering if there was a shortcode I could add without diving into php. Something like include_author=”true” or display_author=”true” is what i’m after.

    Let me know if there’s a way to do that. Thanks!

    — alternatively, if it’s php only, where would I go to edit your plugin string to make it show up?

    I appreciate it.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Bill Erickson

    (@billerickson)

    This currently isn’t built into the plugin, but I’ve added it to the roadmap ( https://github.com/billerickson/display-posts-shortcode/issues/15 ).

    For now, it will require custom php coding. You’ll need to use an output filter. Try adding this to your theme’s functions.php file: http://www.billerickson.net/code/display-posts-shortcode-show-author/

    Thread Starter amurphyatx

    (@amurphyatx)

    Bill, great news about the roadmap– and thanks for your quick response.

    Still unable to get author to display, however. Dreamweaver showed me an error on the first snippet of author code which originally read:

    $author = ‘<span class=”author”>’by ‘ . get_the_author() . ‘</span>;

    I then changed it to the following, and the error went away:

    $author = ‘<span class=”author”>by ‘ . get_the_author() . ‘</span>’;

    (in functions.php)

    I’ve also tried to take out the ‘by’ all together, thinking that was the problem, and have added .author {display:block;} in the css just for insurance. Still no luck.

    Any thoughts?

    Thank you for your time on this.

    Thread Starter amurphyatx

    (@amurphyatx)

    Wait a minute– i’m very sorry, but this just started working. Guess cache of functions.php takes a bit longer to reload.

    Thank you!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Add author display to post // shortcode?’ is closed to new replies.