• Resolved dromelos

    (@dromelos)


    I’m using Snippet Vault with AI Engine and trying to use the following instructions in a function:
    get_post_type(), get_the_ID(), get_query_var('my_par').
    None of these return the expected value, while get_current_user_id() works.
    Where am I going wrong?

Viewing 1 replies (of 1 total)
  • Plugin Support Val Meow

    (@valwa)

    Hey @dromelos! ??

    These functions (without parameters) retrieve the ID of the current item in the WordPress Loop. However, if you’re calling a snippet of code that is executed outside of this loop, the value cannot be fetched this way. Hope this helps!

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.