Support » Plugin: Attachments » Using default post_title for attachment title

  • 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(
              "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?


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


    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?

    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.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Using default post_title for attachment title’ is closed to new replies.