WordPress.org

Ready to get started?Download WordPress

Forums

Attachments
Using default post_title for attachment title (3 posts)

  1. skarck
    Member
    Posted 1 year ago #

    Hi!

    I really like the concept of your plugin. seems to be perfect for custom gallery solutions where backend users just need to upload, rename and reorder files/images.

    but i wonder why the plugin relies on post_meta for title and caption of the attachments rather then using the native post_title and post_excerpt/post_content? same with menu_order.

    by changing this we could stay with the core functions for viewing the files on frontend like:

    $images = get_posts(
              array(
              "numberposts" => -1,
              "post_parent" => get_the_ID(),
              "post_type" => "attachment",
              "post_mime_type" => "image",
              "order" => "ASC",
              "orderby" => "menu_order"
                   )
            );
    if ( $images ) { 
    
    foreach( $images as $image ) {
    ...

    could that be changed easily?

    cheers!
    m

    http://wordpress.org/extend/plugins/attachments/

  2. Jonathan Christopher
    Member
    Plugin Author

    Posted 1 year ago #

    Glad you like the looks of the plugin! I might be misunderstanding the question but with this plugin you customize the fields associated with each attachment and can retrieve any metadata about it using the utility functions or even by hand using the id which correlates to the media post id as you'd normally use it. Does that help answer the question at all?

  3. skarck
    Member
    Posted 1 year ago #

    thanks for your answer.

    I know that i can retrieve title and caption from the attachments post_meta. i just thought that using the attachments post_title and post_excerpt would make themes and their custom gallery codes working both in installs with AND without your plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic