WordPress.org

Support

Support » Plugins and Hacks » Attachments » [Resolved] Include/Exclude Attachments for specific page-ID's

[Resolved] Include/Exclude Attachments for specific page-ID's

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jonathan Christopher

    @jchristopher

    Yes, it’s absolutely possible! When instantiating Attachments, pass along the desired ID as the second parameter:

    // retrieve Attachments for post 123
    $attachments = new Attachments( 'attachments', 123 );

    I think you misunderstood. When using “attachments_register” and creating instances you can tell which post types to utilize (‘Page’). This puts the Attachments-metabox on all pages.
    What i want to do is only have the metabox on a page of a specific ID, in my situation the page used as static homepage (get_option(‘page_on_front’)). Is it possible to, instead of post-types like ‘page’, enter ID’s for utilizing Attachments?

    Thanks for the help.

    Plugin Author Jonathan Christopher

    @jchristopher

    Ah ha, sorry about misunderstanding. Placement options are currently in the works but not yet available. Hopefully within the week.

    Plugin Author Jonathan Christopher

    @jchristopher

    This feature has been added in version 3.5

    I need this too. Is there any example of how I can achieve this with version 3.5 and later? Can’t find an example with this in the documentation.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Include/Exclude Attachments for specific page-ID's’ is closed to new replies.
Skip to toolbar