Viewing 6 replies - 1 through 6 (of 6 total)
  • i would definately agree. I am also looking for a similar shortcode.

    is there anyone other there who can assist.

    Plugin Author Bill Erickson

    (@billerickson)

    I’ve created a ticket for it here: https://github.com/billerickson/display-posts-shortcode/issues/95

    Next time I have some free time I’ll build in this feature.

    What should display if the current user is not logged in? No posts, or all posts (not limited to a user)?

    This could save the day here too. I found the ticket first and tried author=”current” in the shortcode but it didn’t work ?? So the track led me here… For me I would like *nothing* to show if current user not logged in ?? Thank you, sweet plugin.

    Plugin Author Bill Erickson

    (@billerickson)

    As of today, this is now included in Display Posts Shortcode 2.6. You can download a copy of the plugin here: https://github.com/billerickson/display-posts-shortcode/archive/master.zip

    I’m waiting until I have a few more features I can add to it before pushing this update out on www.remarpro.com.

    PG

    (@parulgarg2)

    Hi Bill

    Great plugin.

    I was just testing Displaying shortcode for ‘current’ author. I tried on the latest version of WordPress 4.4.2 but it didn’t work. It didn’t show anything.

    I checked the plugin code and recon you are using get_current_user_id() instead of getting username.

    I am not sure if it is supposed to work or not, but I updated it with the

    $current_user = wp_get_current_user();
    $current_user->user_login

    and it worked.

    So I just wanted to let you know ??

    But great plugin once again!!

    Cheers

    Plugin Author Bill Erickson

    (@billerickson)

    Good catch. Even though the shortcode parameter is ‘author’, it’s setting the query argument ‘author_name’ since most users don’t know the author ID.

    I’ve made the fix: https://github.com/billerickson/display-posts-shortcode/commit/78181b28fb93edf9556ef3b4d23998a96859daca

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘display current author instead of specific one’ is closed to new replies.