The Pods Framework is a Content Development Framework for WordPress - It lets you create and extend content types that can be used for any project. Add fields of various types we've built in, or add your own with custom inputs, you have total control.
Retrieving the direct permalink of PDF attachments seems troublesome.
Expected Behavior
Inside a Pods Template, using [each my_pdf_field], the {@permalink} inside should be to the PDF attachment.
Current Behavior
When there are multiple PDFs attached to a post/CPT, the {@permalink} inside the [each] results in a string like https://example.com/wp-content/uploads/pdf1.pdf and https://example.com/wp-content/uploads/pdf2.pdf (with the "and" in the middle).
Steps to Reproduce (for bugs)
Create a CPT, or extend an existing post type, to add a media field, with multiple uploads.
Upload at least two PDF files.
Add a Pod Template (and include some way to show it). This is part of my pod template:
Try and use {@permalink} or something more intuitive than the {@ID,wp_get_attachment_url} which does work as desired, but which took a while to discover.
Potential Solution
Either add a magic tag that makes this easy to retrieve, or add an example for this exact case to the magic tags documentation page.
WordPress Environment
```
Debug Information
WordPress Version: 4.9.6
PHP Version: 7.0.30-0ubuntu0.16.04.1
MySQL Version: 5.7.21
Server Software: Apache
Your User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/66.0.3359.181 Safari/537.36
Session Save Path: /var/lib/php/sessions
Session Save Path Exists: Yes
Session Save Path Writeable: Yes
Session Max Lifetime: 1440
Opcode Cache:
Apc: No
Memcached: No
OPcache: No
Redis: No
Object Cache:
APC: No
APCu: No
Memcache: No
Memcached: Yes
Redis: Yes
WPDB Prefix: wp_
WP Multisite Mode: No
WP Memory Limit: 40M
Pods Network-Wide Activated: No
Pods Install Location: /nas/content/staging/avxjam/wp-content/plugins/pods/
Pods Tableless Mode Activated: No
Pods Light Mode Activated: No
Currently Active Theme: Jamul Casino
Currently Active Plugins:
Accordion Shortcodes: 2.3.3
Admin Columns: 3.1.10
Advanced Custom Fields PRO: 5.6.10
EWWW Image Optimizer Cloud: 4.2.1
Genesis JS / No JS: 3.2.1
Genesis Responsive Slider: 0.9.6
Ninja Forms: 3.3.1
Pods - Custom Content Types and Fields: 2.7.3
Regenerate Thumbnails: 3.0.2
Simple Google Analytics Plugin: 1.0
Simple Social Icons: 2.0.1
Tabby Responsive Tabs: 1.2.3
The Events Calendar: 4.6.16
WP Migrate DB Pro: 1.8.1
WP Migrate DB Pro Media Files: 1.4.9
Yoast SEO: 7.5.1
```
Pods Package Export
```
{"meta":{"version":"2.7.3","build":1527538536},"pods":{"309":{"id":309,"name":"casino_host","label":"Casino Hosts","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"casino_host_role":{"id":311,"name":"casino_host_role","label":"Role","description":"Job title","help":"","class":"","type":"text","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"1","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","default_value":"Casino Host","text_placeholder":""},"casino_host_email_address":{"id":312,"name":"casino_host_email_address","label":"Email address","description":"","help":"","class":"","type":"email","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"1","email_max_length":"255","email_html5":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","email_repeatable":"0","email_placeholder":""},"casino_host_bio":{"id":315,"name":"casino_host_bio","label":"Bio","description":"","help":"","class":"","type":"wysiwyg","weight":2,"pick_object":"","pick_val":"","sister_id":"","required":"1","wysiwyg_editor":"tinymce","wysiwyg_media_buttons":"1","wysiwyg_oembed":"0","wysiwyg_wptexturize":"1","wysiwyg_convert_chars":"1","wysiwyg_wpautop":"1","wysiwyg_allow_shortcode":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","wysiwyg_repeatable":"0","wysiwyg_allowed_html_tags":""}},"show_in_menu":"1","label_singular":"Casino Host","public":"0","show_ui":"1","supports_title":"1","supports_editor":"0","publicly_queryable":"0","exclude_from_search":"1","capability_type":"post","capability_type_custom":"casino_host","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"1","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"1","supports_post_formats":"0","supports_genesis_seo":"0","supports_genesis_layouts":"0","supports_genesis_simple_sidebars":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","show_in_nav_menus":"0","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0","pfat_single":"Casino Host Template","built_in_taxonomies_tribe_events_cat":"0","menu_icon":"dashicons-businessman"},"499":{"id":499,"name":"events_hero","label":"Events Hero","description":"","type":"settings","storage":"none","object":"","alias":"","fields":{"hero_image":{"id":500,"name":"hero_image","label":"Hero Image","description":"","help":"","class":"","type":"file","weight":0,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"single","file_uploader":"attachment","file_attachment_tab":"upload","file_edit_title":"1","file_show_edit_link":"0","file_linked":"0","file_limit":"0","file_restrict_filesize":"10MB","file_type":"images","file_field_template":"rows","file_add_button":"Add File","file_modal_title":"Attach a file","file_modal_add_button":"Add File","file_wp_gallery_output":"0","file_wp_gallery_link":"post","file_wp_gallery_columns":"1","file_wp_gallery_random_sort":"0","file_wp_gallery_size":"thumbnail","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","file_allowed_extensions":""},"hero_text":{"id":502,"name":"hero_text","label":"Hero Text","description":"","help":"","class":"","type":"wysiwyg","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","wysiwyg_editor":"tinymce","wysiwyg_media_buttons":"1","wysiwyg_oembed":"0","wysiwyg_wptexturize":"1","wysiwyg_convert_chars":"1","wysiwyg_wpautop":"1","wysiwyg_allow_shortcode":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","wysiwyg_repeatable":"0","wysiwyg_allowed_html_tags":""},"hero_text_background_image":{"id":501,"name":"hero_text_background_image","label":"Hero Text Background Image","description":"","help":"","class":"","type":"file","weight":2,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"single","file_uploader":"attachment","file_attachment_tab":"upload","file_edit_title":"1","file_show_edit_link":"0","file_linked":"0","file_limit":"0","file_restrict_filesize":"10MB","file_type":"images","file_field_template":"rows","file_add_button":"Add File","file_modal_title":"Attach a file","file_modal_add_button":"Add File","file_wp_gallery_output":"0","file_wp_gallery_link":"post","file_wp_gallery_columns":"1","file_wp_gallery_random_sort":"0","file_wp_gallery_size":"thumbnail","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","file_allowed_extensions":""},"hero_background_colour":{"id":503,"name":"hero_background_colour","label":"Hero Background Colour","description":"","help":"","class":"","type":"color","weight":3,"pick_object":"","pick_val":"","sister_id":"","required":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"unique":"0","color_repeatable":"0"}},"show_in_menu":1,"menu_name":"Events Hero","menu_location":"appearances","ui_style":"settings"},"649":{"id":649,"name":"nested_content_block","label":"Nested Content Blocks","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"text_overlay":{"id":650,"name":"text_overlay","label":"Text overlay","description":"","help":"","class":"","type":"text","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"background_colour":{"id":651,"name":"background_colour","label":"Background Colour","description":"","help":"","class":"","type":"color","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","color_repeatable":"0"},"link":{"id":652,"name":"link","label":"Link","description":"","help":"","class":"","type":"website","weight":2,"pick_object":"","pick_val":"","sister_id":"","required":"0","website_format":"normal","website_allow_port":"0","website_clickable":"0","website_new_window":"0","website_max_length":"255","website_html5":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","website_repeatable":"0","website_placeholder":""},"block_size":{"id":653,"name":"block_size","label":"Block Size","description":"","help":"","class":"","type":"pick","weight":3,"pick_object":"custom-simple","pick_val":"","sister_id":"","pick_custom":"half-width\nfull-width","required":"1","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""}},"show_in_menu":"1","label_singular":"Nested Content Block","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"nested_content_block","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"1","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","supports_genesis_seo":"0","supports_genesis_layouts":"0","supports_genesis_simple_sidebars":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_tribe_events_cat":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_single":"Casino Host Template","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"369":{"id":369,"name":"page","label":"Page","description":"","type":"post_type","storage":"meta","object":"page","alias":"","fields":{"hero_image_use_featured":{"id":373,"name":"hero_image_use_featured","label":"Use Featured Image as Hero?","description":"","help":"","class":"","type":"boolean","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","pick_post_status":["publish"],"boolean_format_type":"checkbox","boolean_yes_label":"Yes","boolean_no_label":"No","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","default_value":"Yes"},"hero_image_vertical_position":{"id":626,"name":"hero_image_vertical_position","label":"Hero Image Vertical Position","description":"\"top\", \"center\", \"bottom\", or a pixel value e.g. \"-310px\". Only the vertical value is needed.","help":"","class":"","type":"text","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"10","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_repeatable":0,"text_placeholder":""},"hero_heading":{"id":374,"name":"hero_heading","label":"Hero Heading","description":"","help":"","class":"","type":"text","weight":2,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"1","text_allowed_html_tags":"br","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"hero_sentence":{"id":375,"name":"hero_sentence","label":"Hero Sentence","description":"","help":"","class":"","type":"text","weight":3,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""}},"show_in_menu":1,"pfat_enable":"0","pfat_run_outside_loop":"0","pfat_single":"Casino Host Template","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"523":{"id":523,"name":"promotion","label":"Promotions","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"promotion_block_size":{"id":525,"name":"promotion_block_size","label":"Block Size","description":"","help":"","class":"","type":"pick","weight":0,"pick_object":"custom-simple","pick_val":"","sister_id":"","pick_custom":"half-width\nfull-width","required":"1","pick_format_type":"single","pick_format_single":"radio","pick_format_multi":"checkbox","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"default_value":"single","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"promotion_background_color":{"id":526,"name":"promotion_background_color","label":"Background Color","description":"","help":"","class":"","type":"color","weight":1,"pick_object":"","pick_val":"","sister_id":"","required":"1","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","color_repeatable":"0"}},"show_in_menu":"1","label_singular":"Promotion","public":"0","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"0","exclude_from_search":"0","capability_type":"post","capability_type_custom":"promotion","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"0","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"1","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"1","supports_post_formats":"0","supports_genesis_seo":"0","supports_genesis_layouts":"0","supports_genesis_simple_sidebars":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_tribe_events_cat":"0","menu_icon":"dashicons-megaphone","show_in_nav_menus":"0","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_single":"Casino Host Template","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"338":{"id":338,"name":"restaurant","label":"Restaurants","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"restaurant_hero_image_position":{"id":505,"name":"restaurant_hero_image_position","label":"Hero Image Vertical Position","description":"\"top\", \"center\", \"bottom\", or a pixel value e.g. \"-310px\". Only the vertical value is needed.","help":"","class":"","type":"text","weight":0,"pick_object":"","pick_val":"","sister_id":"","pick_custom":"top\ncenter\nbottom","required":"1","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"default_value":"center","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"restaurant_logo":{"id":339,"name":"restaurant_logo","label":"Logo","description":"","help":"","class":"","type":"file","weight":1,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"1","file_format_type":"single","file_uploader":"attachment","file_attachment_tab":"browse","file_edit_title":"1","file_show_edit_link":"0","file_linked":"0","file_limit":"0","file_restrict_filesize":"10MB","file_type":"images","file_field_template":"tiles","file_add_button":"Set Logo","file_modal_title":"Attach a logo","file_modal_add_button":"Set Logo","file_wp_gallery_output":"0","file_wp_gallery_link":"post","file_wp_gallery_columns":"1","file_wp_gallery_random_sort":"0","file_wp_gallery_size":"thumbnail","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","file_allowed_extensions":""},"restaurant_cuisine":{"id":340,"name":"restaurant_cuisine","label":"Cuisine","description":"Type of food","help":"","class":"","type":"text","weight":2,"pick_object":"","pick_val":"","sister_id":"","required":"1","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"restaurant_dress_code":{"id":341,"name":"restaurant_dress_code","label":"Dress code","description":"","help":"","class":"","type":"pick","weight":3,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"1","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_custom":"Casual\nElegant Casual","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"restaurant_price_range":{"id":342,"name":"restaurant_price_range","label":"Price Range","description":"$, $$, or $$$","help":"","class":"","type":"pick","weight":4,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"1","pick_format_type":"single","pick_format_single":"dropdown","pick_format_multi":"checkbox","pick_allow_add_new":"1","pick_taggable":"0","pick_show_icon":"1","pick_show_edit_link":"1","pick_show_view_link":"1","pick_limit":"0","pick_user_role":[],"pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","pick_custom":"$\n$$\n$$$","pick_select_text":"","pick_table_id":"","pick_table_index":"","pick_display":"","pick_where":"","pick_orderby":"","pick_groupby":""},"restaurant_can_reserve":{"id":395,"name":"restaurant_can_reserve","label":"Can Reserve?","description":"","help":"","class":"","type":"boolean","weight":5,"pick_object":"","pick_val":"","sister_id":"","required":"0","pick_post_status":["publish"],"boolean_format_type":"checkbox","boolean_yes_label":"Yes","boolean_no_label":"No","admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0"},"restaurant_reservation_number":{"id":343,"name":"restaurant_reservation_number","label":"Reservation Number","description":"","help":"","class":"","type":"phone","weight":6,"pick_object":"","pick_val":"","sister_id":"","required":"0","phone_format":"999-999-9999 x999","phone_enable_phone_extension":"0","phone_max_length":"25","phone_html5":"1","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","phone_repeatable":"0","phone_placeholder":""},"restaurant_reservation_link":{"id":344,"name":"restaurant_reservation_link","label":"Reservation Link","description":"","help":"","class":"","type":"website","weight":7,"pick_object":"","pick_val":"","sister_id":"","required":"0","website_format":"normal","website_allow_port":"0","website_clickable":"0","website_new_window":"0","website_max_length":"255","website_html5":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","website_repeatable":"0","website_placeholder":""},"restaurant_heading":{"id":345,"name":"restaurant_heading","label":"Heading","description":"Eye-catching heading above description","help":"","class":"","type":"text","weight":8,"pick_object":"","pick_val":"","sister_id":"","required":"1","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","text_repeatable":"0","text_placeholder":""},"restaurant_description":{"id":346,"name":"restaurant_description","label":"Description","description":"","help":"","class":"","type":"wysiwyg","weight":9,"pick_object":"","pick_val":"","sister_id":"","required":"0","wysiwyg_editor":"tinymce","wysiwyg_media_buttons":"1","wysiwyg_oembed":"0","wysiwyg_wptexturize":"1","wysiwyg_convert_chars":"1","wysiwyg_wpautop":"1","wysiwyg_allow_shortcode":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","wysiwyg_repeatable":"0","wysiwyg_allowed_html_tags":""},"restaurant_menu_pdf":{"id":347,"name":"restaurant_menu_pdf","label":"Menu PDF","description":"","help":"","class":"","type":"file","weight":10,"pick_object":"custom-simple","pick_val":"","sister_id":"","required":"0","file_format_type":"multi","file_uploader":"attachment","file_attachment_tab":"browse","file_edit_title":"1","file_show_edit_link":"0","file_linked":"0","file_limit":"0","file_restrict_filesize":"10MB","file_type":"other","file_field_template":"rows","file_add_button":"Add Menu PDF","file_modal_title":"Attach a menu PDF","file_modal_add_button":"Add Menu PDF","file_wp_gallery_output":"0","file_wp_gallery_link":"post","file_wp_gallery_columns":"1","file_wp_gallery_random_sort":"0","file_wp_gallery_size":"thumbnail","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","file_allowed_extensions":"pdf"},"restaurant_hours":{"id":348,"name":"restaurant_hours","label":"Hours","description":"","help":"","class":"","type":"wysiwyg","weight":11,"pick_object":"","pick_val":"","sister_id":"","required":"1","wysiwyg_editor":"tinymce","wysiwyg_media_buttons":"1","wysiwyg_oembed":"0","wysiwyg_wptexturize":"1","wysiwyg_convert_chars":"1","wysiwyg_wpautop":"1","wysiwyg_allow_shortcode":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","wysiwyg_repeatable":"0","wysiwyg_allowed_html_tags":""},"restaurant_info_background":{"id":600,"name":"restaurant_info_background","label":"Restaurant Info Background Color","description":"","help":"","class":"","type":"color","weight":12,"pick_object":"","pick_val":"","sister_id":"","required":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","color_repeatable":"0"},"menu_area_background_colour":{"id":601,"name":"menu_area_background_colour","label":"Menu Area Background Color","description":"","help":"","class":"","type":"color","weight":13,"pick_object":"","pick_val":"","sister_id":"","required":"0","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","unique":"0","color_repeatable":"0"}},"show_in_menu":"1","label_singular":"Restaurant","public":"1","show_ui":"1","supports_title":"1","supports_editor":"0","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"restaurant","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"1","supports_excerpt":"1","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","supports_genesis_seo":"0","supports_genesis_layouts":"0","supports_genesis_simple_sidebars":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_single":"Casino Host Template","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0","built_in_taxonomies_tribe_events_cat":"0","menu_icon":"dashicons-store"},"508":{"id":508,"name":"reward","label":"Rewards","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":{"icon_url":{"id":524,"name":"icon_url","label":"Icon URL","description":"","help":"","class":"","type":"text","weight":0,"pick_object":"","pick_val":"","sister_id":"","required":"0","text_allow_shortcode":"0","text_allow_html":"0","text_allowed_html_tags":"strong em a ul ol li b i","text_max_length":"255","pick_post_status":["publish"],"admin_only":"0","restrict_role":"0","restrict_capability":"0","hidden":"0","read_only":"0","roles_allowed":["administrator"],"rest_read":"0","rest_write":"0","rest_pick_response":"array","rest_pick_depth":"2","text_repeatable":0,"text_placeholder":""}},"show_in_menu":"1","label_singular":"Reward","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"1","exclude_from_search":"0","capability_type":"post","capability_type_custom":"reward","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"1","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"1","can_export":"1","default_status":"draft","supports_author":"0","supports_thumbnail":"1","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"0","supports_post_formats":"0","supports_genesis_seo":"0","supports_genesis_layouts":"0","supports_genesis_simple_sidebars":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_tribe_events_cat":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_single":"Casino Host Template","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0"},"639":{"id":639,"name":"slide","label":"Slides","description":"","type":"post_type","storage":"meta","object":"","alias":"","fields":[],"show_in_menu":"1","label_singular":"Slide","public":"1","show_ui":"1","supports_title":"1","supports_editor":"1","publicly_queryable":"0","exclude_from_search":"0","capability_type":"post","capability_type_custom":"slide","capability_type_extra":"1","has_archive":"0","hierarchical":"0","rewrite":"0","rewrite_with_front":"1","rewrite_feeds":"0","rewrite_pages":"1","query_var":"0","can_export":"0","default_status":"draft","supports_author":"0","supports_thumbnail":"1","supports_excerpt":"0","supports_trackbacks":"0","supports_custom_fields":"0","supports_comments":"0","supports_revisions":"0","supports_page_attributes":"1","supports_post_formats":"0","supports_genesis_seo":"0","supports_genesis_layouts":"0","supports_genesis_simple_sidebars":"0","built_in_taxonomies_category":"0","built_in_taxonomies_link_category":"0","built_in_taxonomies_post_tag":"0","built_in_taxonomies_tribe_events_cat":"0","show_in_nav_menus":"1","show_in_admin_bar":"1","pfat_enable":"0","pfat_run_outside_loop":"0","pfat_single":"Casino Host Template","pfat_append_single":"append","pfat_filter_single":"the_content","pfat_append_archive":"append","pfat_filter_archive":"the_content","rest_enable":"0","read_all":"0","write_all":"0","menu_icon":"dashicons-slides"}},"templates":{"Casino Host Template":{"id":335,"name":"Casino Host Template","code":"
Issue Overview
Retrieving the direct permalink of PDF attachments seems troublesome.
Expected Behavior
Inside a Pods Template, using
[each my_pdf_field]
, the{@permalink}
inside should be to the PDF attachment.Current Behavior
When there are multiple PDFs attached to a post/CPT, the
{@permalink}
inside the[each]
results in a string likehttps://example.com/wp-content/uploads/pdf1.pdf and https://example.com/wp-content/uploads/pdf2.pdf
(with the "and" in the middle).Steps to Reproduce (for bugs)
Create a CPT, or extend an existing post type, to add a media field, with multiple uploads.
Upload at least two PDF files.
Add a Pod Template (and include some way to show it). This is part of my pod template:
{@permalink}
or something more intuitive than the{@ID,wp_get_attachment_url}
which does work as desired, but which took a while to discover.Potential Solution
Either add a magic tag that makes this easy to retrieve, or add an example for this exact case to the magic tags documentation page.
WordPress Environment
Pods Package Export
{@post_title}<\/h2>\r\n\t
{@casino_host_role}<\/p>\r\n\t
{@casino_host_email_address}<\/p>\r\n<\/div>\t\t\t","type":"template","slug":"casino-host-template","options":{"_edit_lock":"1527266625:4","_edit_last":"3","admin_only":"","restrict_capability":"","capability_allowed":"","pod_reference":"a:1:{s:3:\"pod\";s:11:\"casino_host\";}"}},"Hero Image Template":{"id":376,"name":"Hero Image Template","code":"[if hero_image_use_featured]\r\n
{@hero_heading}<\/h1>\r\n\t[\/if]\r\n\t[if hero_sentence]\r\n\t\t
{@hero_sentence}<\/p>\r\n\t[\/if]\r\n\t<\/div>\r\n<\/div>\r\n[\/if]\t\t\t\t\t\t\t\t\t\t\t","type":"template","slug":"hero-image-template","options":{"_edit_lock":"1527501691:3","_edit_last":"3","admin_only":"","restrict_capability":"","capability_allowed":"","pod_reference":"a:1:{s:3:\"pod\";s:4:\"page\";}"}},"Restaurant Template":{"id":396,"name":"Restaurant Template","code":"
{@post_title}<\/h2>\r\n\t\r\n\t\t
{@restaurant_cuisine}<\/span>Cuisine<\/span><\/p>\r\n\t<\/div>\r\n\t\r\n\t\t
{@restaurant_dress_code}<\/span>Dress Code<\/span><\/p>\r\n\t<\/div>\r\n\t\r\n\t\t
{@restaurant_price_range}<\/span>Price Range<\/span><\/p>\r\n\t<\/div>\r\n\t[if restaurant_can_reserve]\r\n\t
\r\n\t[if restaurant_reservation_number]\r\n\t{@restaurant_reservation_number}<\/span>\r\n\t[\/if]\r\n\t[if restaurant_reservation_link]\r\n\tOpen Table ><\/a><\/span>\r\n\t[\/if]\r\n\tReservation<\/span><\/p><\/div>\r\n\t[\/if]\r\n<\/div>\r\n\r\n\t\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t
{@restaurant_heading}<\/h2>\r\n\t\t\t\t{@restaurant_description}\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t\t\r\n\t\t\t\r\n\t\t\t\t[if restaurant_menu_pdf]\r\n\t\t\t\t
Menu<\/h2>\r\n\t\t\t\t[each restaurant_menu_pdf]\r\n\t\t\t\t
<\/span>{@post_title}<\/span><\/a><\/p>\r\n\t\t\t\t[\/each]\r\n\t\t\t\t<\/span>\r\n\t\t\t\t[\/if]\r\n\t\t\t\t[if restaurant_hours]\r\n\t\t\t\t
Hours<\/h2>\r\n\t\t\t\t{@restaurant_hours}\r\n\t\t\t\t[\/if]\r\n\t\t\t<\/div>\r\n\t\t<\/div>\r\n\t<\/div>\r\n<\/div>","type":"template","slug":"restaurant-meta-template","options":{"_edit_lock":"1527538527:3","_edit_last":"3","admin_only":"","restrict_capability":"","capability_allowed":"","pod_reference":"a:1:{s:3:\"pod\";s:10:\"restaurant\";}"}},"Nested Content Blocks":{"id":654,"name":"Nested Content Blocks","code":"\r\n\r\n\t\r\n\t\t
{@text_overlay}<\/h2>\r\n\t\t\t{@post_content}\r\n\t<\/div>\r\n<\/div>\t\t\t\t\t\r\n<\/a>","type":"template","slug":"nested-content-blocks","options":{"_edit_lock":"1527510584:3","_edit_last":"3","admin_only":"","restrict_capability":"","capability_allowed":"","pod_reference":"a:1:{s:3:\"pod\";s:20:\"nested_content_block\";}"}},"Rewards":{"id":507,"name":"Rewards","code":"\r\n\t\r\n\t\t
jimtrue
commented
6 years ago
quasel
commented
6 years ago
- © Githubissues.
- Githubissues is a development platform for aggregating issues.
{@post_title}<\/h2>\r\n\t\t
{@post_content}<\/p>\r\n\t<\/div>\r\n<\/div>\t\t\t\t\t","type":"template","slug":"rewards","options":{"_edit_lock":"1527501678:3","_edit_last":"3","admin_only":"","restrict_capability":"","capability_allowed":"","pod_reference":"a:1:{s:3:\"pod\";s:6:\"reward\";}"}}}} ```
Workaround or Alternate Solution Until Bug is Addressed
{@ID,wp_get_attachment_url}
works.@GaryJones Related to #4040
I would go as far as calling it a Duplicate :D as the issue is mentioned in there too!