WordPress.org

Forums

[closed] Post ID in Plugin (2 posts)

  1. hbhb
    Member
    Posted 6 years ago #

    Hello,

    I use a modified version of the following script:
    http://codex.wordpress.org/Function_Reference/get_pages#Displaying_Child_pages_of_the_current_page_in_post_format

    It works fine when I use the code directly in my Sidebar file of the activated theme but I want to use it in a Plugin / Widget but the script can not receive the required Post ID. $post->ID is empty.

    Error Message

    Notice: Undefined variable: post
    Notice: Trying to get property of non-object

  2. MichaelH
    Member
    Posted 6 years ago #

    Better to keep the thread here:
    http://wordpress.org/support/topic/287344

Topic Closed

This topic has been closed to new replies.

About this Topic