Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1053383

    Hi. I’m trying to display logged in user information on pages on my site i.e ‘These are the properties belonging to [user company]’
    I’ve done it before, but when I updated the theme or the site, the code was overwritten, I obviously stored it in the wrong place.
    Can you point me to a plugin or somewhere that will show me how to write it and where to store it.

    Most shortcode plugins I’ve found don’t display what I need.

    #1053462

    Hey ACJJ619,
    Any customizations you make should be stored in a child theme functions.php so it won’t be overwritten.
    Without knowing what info you wish to display, I found this plugin that seems to offer a good selection: User Shortcodes
    Another option is writing your own with this article:
    How to Get Logged-in User’s Info in WordPress for Personalized Results
    Here is the WordPress Codex for the function that has been updated with v4.5: Function Reference/wp get current user

    Best regards,
    Mike

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.