[Resolved] Create shortcode with PHP to insert in header (Pods)

Home Forums Support Create shortcode with PHP to insert in header (Pods)

  • This topic has 5 replies, 3 voices, and was last updated 10 months ago by David.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
  • #1066684

    Hey guys!

    Trying to create a shortcode that I can use in my Header Element.
    The code seems to work, because it gets the correct data from my PODS field that I’m trying to get with this code:

    -Content removed because of security reasons-

    The URL that get’s outputted is correct. However I would like to have it outputted with an anchor tag below the header and not before the header content 😀

    I suppose I write something wrong in my shortcode, and I would appreciate if someone would point out where the fault is!

    Thanks a lot for the greatest theme and support EVER!

    Lead Developer
    Lead Developer

    Thanks Tom!
    When I’m using the shortcode in the header I’m just getting out a “1” which I assume is the ID of the Pod. (Instead of the expected URL that I got with just pasting the PHP in raw via a hook)

    I guess I need to learn a bit more about Pods… 😀

    Customer Support

    Hi there,

    you may want to look at the display() function in PODs as opposed to the field() function.

    Jim True on there support is really good so maybe worth joining there slack channel:



    I found a guy who helped me out with some code.

    The issue was, when inserting the shortcode in the header, I displayed the header elements ID instead of the pod.

    Thanks for your help guys!

    Customer Support

    Awesome – glad you found the solution.

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