• Resolved sinahosseinigst

    (@sinahosseinigst)


    Hey there @codingpanda
    I’m just using Panda Pods Repeater Field for a project, but in one of the groups (in which there are so many loops), whenever I add content to my Repeater, then all the content will be lost the next time I see it! For example, in the Section 2 group of this file, you can add your lyrics for one track of your music album (both in Farsi and in English), but the weird thing is that when you submitted everything for track 1, and you’re going to add everything for track 2 for example, you see these two things: the lyrics for track 1 appears in track 2! And also, all the lyrics of track 1 are gone! Just why????????
    Please test it @codingpanda! I’m in need of urgent help!

    {
        "meta": {
            "version": "2.8.10",
            "build": 1645692218
        },
        "pods": [
            {
                "name": "announcement",
                "id": 333,
                "label": "Announcements",
                "description": "",
                "type": "pod",
                "storage": "table",
                "label_singular": "Announcement",
                "public": "1",
                "show_ui": "1",
                "pod_index": "name",
                "_migrated_28": "1",
                "unique": "0",
                "required": "0",
                "ui_style": "settings",
                "show_in_menu": "0",
                "menu_position": "0",
                "ui_actions_enabled": [
                    "add",
                    "edit",
                    "duplicate",
                    "delete",
                    "export"
                ],
                "ui_reorder_field": "menu_order",
                "ui_fields_manage": [
                    "name"
                ],
                "groups": [
                    {
                        "name": "details",
                        "id": 334,
                        "label": "Details",
                        "description": "",
                        "weight": 0,
                        "fields": [
                            {
                                "name": "name",
                                "id": 335,
                                "label": "Name",
                                "description": "",
                                "weight": 0,
                                "type": "text",
                                "required": "0",
                                "sister_id": "-- Select One --",
                                "unique": "0",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "news_image",
                                "id": 340,
                                "label": "News Image",
                                "description": "",
                                "weight": 1,
                                "type": "file",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "file_format_type": "single",
                                "file_uploader": "attachment",
                                "file_attachment_tab": "upload",
                                "file_upload_dir": "wp",
                                "file_edit_title": "1",
                                "file_show_edit_link": "0",
                                "file_linked": "0",
                                "file_limit": "0",
                                "file_type": "images",
                                "file_field_template": "rows",
                                "file_add_button": "Add File",
                                "file_modal_title": "Attach a file",
                                "file_modal_add_button": "Add File",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "news_title",
                                "id": 351,
                                "label": "News Title",
                                "description": "",
                                "weight": 2,
                                "type": "text",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "news_text",
                                "id": 352,
                                "label": "News Text",
                                "description": "",
                                "weight": 3,
                                "type": "wysiwyg",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "wysiwyg_editor": "tinymce",
                                "roles_allowed": "administrator"
                            }
                        ]
                    }
                ]
            },
            {
                "name": "lha_detail",
                "id": 392,
                "label": "LHA Details",
                "description": "",
                "type": "pod",
                "storage": "table",
                "label_singular": "LHA Detail",
                "public": "1",
                "show_ui": "1",
                "pod_index": "name",
                "_migrated_28": "1",
                "required": "0",
                "unique": "0",
                "ui_style": "settings",
                "show_in_menu": "0",
                "menu_position": "0",
                "ui_actions_enabled": [
                    "add",
                    "edit",
                    "duplicate",
                    "delete",
                    "export"
                ],
                "ui_reorder_field": "menu_order",
                "ui_fields_manage": [
                    "name"
                ],
                "groups": [
                    {
                        "name": "details",
                        "id": 393,
                        "label": "Details",
                        "description": "",
                        "weight": 0,
                        "fields": [
                            {
                                "name": "name",
                                "id": 394,
                                "label": "Name",
                                "description": "",
                                "weight": 0,
                                "type": "text",
                                "required": "0",
                                "sister_id": "-- Select One --",
                                "unique": "0",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "track_name",
                                "id": 399,
                                "label": "Track Name",
                                "description": "",
                                "weight": 1,
                                "type": "text",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "sub_lyrics",
                                "id": 426,
                                "label": "Sub Lyrics",
                                "description": "",
                                "weight": 2,
                                "type": "pandarepeaterfield",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "pandarepeaterfield_table": "lha_sub_lyrics",
                                "pandarepeaterfield_field_width": "100",
                                "pandarepeaterfield_entry_limit": "0",
                                "pandarepeaterfield_enable_load_more": "0",
                                "pandarepeaterfield_initial_amount": "10",
                                "pandarepeaterfield_enable_trash": "0",
                                "pandarepeaterfield_order_by": "pandarf_order",
                                "pandarepeaterfield_order": "ASC",
                                "pandarepeaterfield_display_order_info": "0",
                                "pandarepeaterfield_apply_admin_columns": "0",
                                "pandarepeaterfield_allow_reassign": "0",
                                "pandarepeaterfield_public_access": "0",
                                "roles_allowed": "administrator"
                            }
                        ]
                    }
                ]
            },
            {
                "name": "lha_english_sub_lyrics",
                "id": 415,
                "label": "LHA English Sub Lyrics Group",
                "description": "",
                "type": "pod",
                "storage": "table",
                "label_singular": "LHA English Sub Lyrics",
                "public": "1",
                "show_ui": "1",
                "pod_index": "name",
                "_migrated_28": "1",
                "unique": "0",
                "required": "0",
                "groups": [
                    {
                        "name": "details",
                        "id": 416,
                        "label": "Details",
                        "description": "",
                        "weight": 0,
                        "fields": [
                            {
                                "name": "english_sub_lyrics",
                                "id": 422,
                                "label": "English Sub Lyrics",
                                "description": "",
                                "weight": 0,
                                "type": "text",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "roles_allowed": "administrator",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255"
                            }
                        ]
                    }
                ]
            },
            {
                "name": "lha_farsi_sub_lyrics",
                "id": 407,
                "label": "LHA Farsi Sub Lyrics Group",
                "description": "",
                "type": "pod",
                "storage": "table",
                "label_singular": "LHA Farsi Sub Lyrics",
                "public": "1",
                "show_ui": "1",
                "pod_index": "name",
                "_migrated_28": "1",
                "unique": "0",
                "required": "0",
                "groups": [
                    {
                        "name": "details",
                        "id": 408,
                        "label": "Details",
                        "description": "",
                        "weight": 0,
                        "fields": [
                            {
                                "name": "farsi_sub_lyrics",
                                "id": 423,
                                "label": "Farsi Sub Lyrics",
                                "description": "",
                                "weight": 0,
                                "type": "text",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "roles_allowed": "administrator",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255"
                            }
                        ]
                    }
                ]
            },
            {
                "name": "lha_sub_lyrics",
                "id": 400,
                "label": "LHA Sub Lyrics Group",
                "description": "",
                "type": "pod",
                "storage": "table",
                "label_singular": "LHA Sub Lyrics",
                "public": "1",
                "show_ui": "1",
                "pod_index": "name",
                "_migrated_28": "1",
                "ui_style": "settings",
                "show_in_menu": "0",
                "menu_position": "0",
                "ui_actions_enabled": [
                    "add",
                    "edit",
                    "duplicate",
                    "delete",
                    "export"
                ],
                "ui_reorder_field": "menu_order",
                "ui_fields_manage": [
                    "name",
                    "modified"
                ],
                "required": "0",
                "unique": "0",
                "groups": [
                    {
                        "name": "details",
                        "id": 401,
                        "label": "Details",
                        "description": "",
                        "weight": 0,
                        "fields": [
                            {
                                "name": "name",
                                "id": 441,
                                "label": "Name",
                                "description": "",
                                "weight": 0,
                                "type": "text",
                                "sister_id": "-- Select One --",
                                "required": "0",
                                "unique": "0",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "farsi_lyrics",
                                "id": 424,
                                "label": "Farsi Lyrics",
                                "description": "",
                                "weight": 1,
                                "type": "pandarepeaterfield",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "pandarepeaterfield_table": "lha_farsi_sub_lyrics",
                                "pandarepeaterfield_field_width": "100",
                                "pandarepeaterfield_entry_limit": "0",
                                "pandarepeaterfield_enable_load_more": "0",
                                "pandarepeaterfield_initial_amount": "10",
                                "pandarepeaterfield_enable_trash": "0",
                                "pandarepeaterfield_order_by": "pandarf_order",
                                "pandarepeaterfield_order": "ASC",
                                "pandarepeaterfield_display_order_info": "0",
                                "pandarepeaterfield_apply_admin_columns": "0",
                                "pandarepeaterfield_allow_reassign": "0",
                                "pandarepeaterfield_public_access": "0",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "english_lyrics",
                                "id": 425,
                                "label": "English Lyrics",
                                "description": "",
                                "weight": 2,
                                "type": "pandarepeaterfield",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "pandarepeaterfield_table": "lha_english_sub_lyrics",
                                "pandarepeaterfield_field_width": "100",
                                "pandarepeaterfield_entry_limit": "0",
                                "pandarepeaterfield_enable_load_more": "0",
                                "pandarepeaterfield_initial_amount": "10",
                                "pandarepeaterfield_enable_trash": "0",
                                "pandarepeaterfield_order_by": "pandarf_order",
                                "pandarepeaterfield_order": "ASC",
                                "pandarepeaterfield_display_order_info": "0",
                                "pandarepeaterfield_apply_admin_columns": "0",
                                "pandarepeaterfield_allow_reassign": "0",
                                "pandarepeaterfield_public_access": "0",
                                "roles_allowed": "administrator"
                            }
                        ]
                    }
                ]
            },
            {
                "name": "lyrics_having_album",
                "id": 364,
                "label": "Lyrics Having Albums",
                "description": "",
                "type": "pod",
                "storage": "table",
                "label_singular": "Lyrics Having Album",
                "public": "1",
                "show_ui": "1",
                "pod_index": "name",
                "_migrated_28": "1",
                "required": "0",
                "unique": "0",
                "ui_style": "settings",
                "show_in_menu": "0",
                "menu_position": "0",
                "ui_actions_enabled": [
                    "add",
                    "edit",
                    "duplicate",
                    "delete",
                    "export"
                ],
                "ui_reorder_field": "menu_order",
                "ui_fields_manage": [
                    "name"
                ],
                "groups": [
                    {
                        "name": "details",
                        "id": 365,
                        "label": "Details",
                        "description": "",
                        "weight": 0,
                        "fields": [
                            {
                                "name": "name",
                                "id": 366,
                                "label": "Name",
                                "description": "",
                                "weight": 0,
                                "type": "text",
                                "required": "0",
                                "sister_id": "-- Select One --",
                                "unique": "0",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "album_image",
                                "id": 371,
                                "label": "Album Image",
                                "description": "",
                                "weight": 1,
                                "type": "file",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "file_format_type": "single",
                                "file_uploader": "attachment",
                                "file_attachment_tab": "upload",
                                "file_upload_dir": "wp",
                                "file_edit_title": "1",
                                "file_show_edit_link": "0",
                                "file_linked": "0",
                                "file_limit": "0",
                                "file_type": "images",
                                "file_field_template": "rows",
                                "file_add_button": "Add File",
                                "file_modal_title": "Attach a file",
                                "file_modal_add_button": "Add File",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "spotify_player",
                                "id": 372,
                                "label": "Spotify Player",
                                "description": "",
                                "weight": 2,
                                "type": "html",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "html_no_label": "1",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "album_name",
                                "id": 373,
                                "label": "Album Name",
                                "description": "",
                                "weight": 3,
                                "type": "text",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "release_date",
                                "id": 374,
                                "label": "Release Date",
                                "description": "",
                                "weight": 4,
                                "type": "text",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "text_allowed_html_tags": "strong em a ul ol li b i",
                                "text_max_length": "255",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "info",
                                "id": 375,
                                "label": "Info",
                                "description": "",
                                "weight": 5,
                                "type": "wysiwyg",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "unique": "0",
                                "wysiwyg_editor": "tinymce",
                                "roles_allowed": "administrator"
                            },
                            {
                                "name": "track_lyrics_and_translation",
                                "id": 458,
                                "label": "Track, Lyrics, and Translation",
                                "description": "",
                                "weight": 6,
                                "type": "pandarepeaterfield",
                                "sister_id": "-- Select One --",
                                "required": "0",
                                "unique": "0",
                                "pandarepeaterfield_table": "lha_detail",
                                "pandarepeaterfield_field_width": "100",
                                "pandarepeaterfield_entry_limit": "0",
                                "pandarepeaterfield_enable_load_more": "0",
                                "pandarepeaterfield_initial_amount": "10",
                                "pandarepeaterfield_enable_trash": "0",
                                "pandarepeaterfield_order_by": "pandarf_order",
                                "pandarepeaterfield_order": "ASC",
                                "pandarepeaterfield_display_order_info": "0",
                                "pandarepeaterfield_apply_admin_columns": "0",
                                "pandarepeaterfield_allow_reassign": "0",
                                "pandarepeaterfield_public_access": "0",
                                "roles_allowed": "administrator"
                            }
                        ]
                    }
                ]
            },
            {
                "name": "padra_content",
                "id": 313,
                "label": "Padra Contents",
                "description": "",
                "type": "post_type",
                "storage": "meta",
                "label_singular": "Padra Content",
                "public": "1",
                "show_ui": "1",
                "rest_enable": "1",
                "supports_title": "1",
                "supports_editor": "1",
                "_migrated_28": "1",
                "required": "0",
                "meta_box_context": "normal",
                "meta_box_priority": "default",
                "can_export": "1",
                "groups": [
                    {
                        "name": "header",
                        "id": 314,
                        "label": "Header",
                        "description": "",
                        "weight": 0,
                        "meta_box_context": "normal",
                        "meta_box_priority": "default",
                        "roles_allowed": "administrator",
                        "fields": [
                            {
                                "name": "header_title",
                                "id": 315,
                                "label": "Header Title",
                                "description": "",
                                "weight": 0,
                                "type": "wysiwyg",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "wysiwyg_editor": "tinymce",
                                "roles_allowed": "administrator",
                                "rest_pick_response": "array",
                                "rest_pick_depth": "1"
                            },
                            {
                                "name": "header_image",
                                "id": 316,
                                "label": "Header Image",
                                "description": "",
                                "weight": 1,
                                "type": "file",
                                "sister_id": "-- Select One --",
                                "required": "1",
                                "file_format_type": "single",
                                "file_uploader": "attachment",
                                "file_attachment_tab": "upload",
                                "file_upload_dir": "wp",
                                "file_edit_title": "1",
                                "file_show_edit_link": "0",
                                "file_linked": "0",
                                "file_limit": "0",
                                "file_type": "images",
                                "file_field_template": "rows",
                                "file_add_button": "Add File",
                                "file_modal_title": "Attach a file",
                                "file_modal_add_button": "Add File",
                                "roles_allowed": "administrator",
                                "rest_pick_response": "array",
                                "rest_pick_depth": "1"
                            }
                        ]
                    },
                    {
                        "name": "section_1",
                        "id": 319,
                        "label": "Section 1",
                        "description": "",
                        "weight": 1,
                        "meta_box_context": "normal",
                        "meta_box_priority": "default",
                        "roles_allowed": "administrator",
                        "fields": [
                            {
                                "name": "news",
                                "id": 345,
                                "label": "News",
                                "description": "",
                                "weight": 0,
                                "type": "pandarepeaterfield",
                                "sister_id": "-- Select One --",
                                "required": "0",
                                "pandarepeaterfield_table": "announcement",
                                "pandarepeaterfield_field_width": "100",
                                "pandarepeaterfield_entry_limit": "0",
                                "pandarepeaterfield_enable_load_more": "0",
                                "pandarepeaterfield_initial_amount": "10",
                                "pandarepeaterfield_enable_trash": "0",
                                "pandarepeaterfield_order_by": "pandarf_order",
                                "pandarepeaterfield_order": "ASC",
                                "pandarepeaterfield_display_order_info": "0",
                                "pandarepeaterfield_apply_admin_columns": "0",
                                "pandarepeaterfield_allow_reassign": "0",
                                "pandarepeaterfield_public_access": "0",
                                "roles_allowed": "administrator",
                                "rest_pick_response": "array",
                                "rest_pick_depth": "1"
                            }
                        ]
                    },
                    {
                        "name": "section_2",
                        "id": 453,
                        "label": "Section 2",
                        "description": "",
                        "weight": 2,
                        "meta_box_context": "normal",
                        "meta_box_priority": "default",
                        "roles_allowed": "administrator",
                        "fields": [
                            {
                                "name": "lyrics_having_album",
                                "id": 457,
                                "label": "Lyrics Having Album",
                                "description": "",
                                "weight": 0,
                                "type": "pandarepeaterfield",
                                "sister_id": "-- Select One --",
                                "required": "0",
                                "pandarepeaterfield_table": "lyrics_having_album",
                                "pandarepeaterfield_field_width": "100",
                                "pandarepeaterfield_entry_limit": "0",
                                "pandarepeaterfield_enable_load_more": "0",
                                "pandarepeaterfield_initial_amount": "10",
                                "pandarepeaterfield_enable_trash": "0",
                                "pandarepeaterfield_order_by": "pandarf_order",
                                "pandarepeaterfield_order": "ASC",
                                "pandarepeaterfield_display_order_info": "0",
                                "pandarepeaterfield_apply_admin_columns": "0",
                                "pandarepeaterfield_allow_reassign": "0",
                                "pandarepeaterfield_public_access": "0",
                                "roles_allowed": "administrator",
                                "rest_pick_response": "array",
                                "rest_pick_depth": "1"
                            }
                        ]
                    }
                ]
            }
        ]
    }
Viewing 9 replies - 31 through 39 (of 39 total)
  • Thread Starter sinahosseinigst

    (@sinahosseinigst)

    this is what I get

    Array ( [0] => stdClass Object ( [ID] => 567 [post_author] => 1 [post_date] => 2022-02-24 13:49:24 [post_date_gmt] => 2022-02-24 13:49:24 [post_content] =>
    Everything goes here ;)
    
    [post_title] => Padra Content [post_excerpt] => [post_status] => publish [comment_status] => closed [ping_status] => closed [post_password] => [post_name] => padra-content [to_ping] => [pinged] => [post_modified] => 2022-02-26 18:16:52 [post_modified_gmt] => 2022-02-26 18:16:52 [post_content_filtered] => [post_parent] => 0 [guid] => http://localhost:8012/wordpress/?post_type=padra_content&p=567 [menu_order] => 0 [post_type] => padra_content [post_mime_type] => [comment_count] => 0 ) )

    so where’s my content :)?

    Plugin Author Coding Panda

    (@codingpanda)

    OK, now we are sure it returns a padra_content. Next, we check if “news” is the right field.

    <?php
              $params= array(
                'orderby' => 't.post_title DESC',
                'limit'   => 25,				    
              );
              $news_pod= pods( 'padra_content', $params );
              $items= $news_pod->data();
              echo '<pre>';
              print_r( $news_pod->fields );
              echo '</pre>';
              foreach( $items as $item ){
                $announcement= pods_field( 'padra_content', $item->ID, 'news' );            
              }
    ?>

    Please let me have the output.

    Thread Starter sinahosseinigst

    (@sinahosseinigst)

    Thanks so for it shows this:

    Array
    (
        [album_single] => Pods\Whatsit\Field Object
            (
                [args] => Array
                    (
                        [object_type] => field
                        [object_storage_type] => post_type
                        [name] => album_single
                        [id] => 546
                        [parent] => 313
                        [group] => 453
                        [label] => Album/Single
                        [description] => 
                        [weight] => 0
                        [type] => pandarepeaterfield
                        [sister_id] => -- Select One --
                        [post_status] => publish
                        [required] => 0
                        [pandarepeaterfield_table] => music
                        [pandarepeaterfield_field_width] => 100
                        [pandarepeaterfield_entry_limit] => 0
                        [pandarepeaterfield_enable_load_more] => 0
                        [pandarepeaterfield_initial_amount] => 10
                        [pandarepeaterfield_enable_trash] => 0
                        [pandarepeaterfield_order_by] => pandarf_order
                        [pandarepeaterfield_order] => ASC
                        [pandarepeaterfield_display_order_info] => 0
                        [pandarepeaterfield_apply_admin_columns] => 0
                        [pandarepeaterfield_allow_reassign] => 0
                        [pandarepeaterfield_public_access] => 0
                        [roles_allowed] => administrator
                        [rest_pick_response] => array
                        [rest_pick_depth] => 1
                    )
    
            )
    
        [announcement] => Pods\Whatsit\Field Object
            (
                [args] => Array
                    (
                        [object_type] => field
                        [object_storage_type] => post_type
                        [name] => announcement
                        [id] => 345
                        [parent] => 313
                        [group] => 319
                        [label] => Announcement
                        [description] => 
                        [weight] => 0
                        [type] => pandarepeaterfield
                        [sister_id] => -- Select One --
                        [post_status] => publish
                        [required] => 0
                        [pandarepeaterfield_table] => news
                        [pandarepeaterfield_field_width] => 100
                        [pandarepeaterfield_entry_limit] => 0
                        [pandarepeaterfield_enable_load_more] => 0
                        [pandarepeaterfield_initial_amount] => 10
                        [pandarepeaterfield_enable_trash] => 0
                        [pandarepeaterfield_order_by] => pandarf_order
                        [pandarepeaterfield_order] => ASC
                        [pandarepeaterfield_display_order_info] => 0
                        [pandarepeaterfield_apply_admin_columns] => 0
                        [pandarepeaterfield_allow_reassign] => 0
                        [pandarepeaterfield_public_access] => 0
                        [roles_allowed] => administrator
                        [rest_pick_response] => array
                        [rest_pick_depth] => 1
                        [old_name] => news
                    )
    
            )
    
        [artist] => Pods\Whatsit\Field Object
            (
                [args] => Array
                    (
                        [object_type] => field
                        [object_storage_type] => post_type
                        [name] => artist
                        [id] => 565
                        [parent] => 313
                        [group] => 549
                        [label] => Artist
                        [description] => 
                        [weight] => 0
                        [type] => pandarepeaterfield
                        [sister_id] => -- Select One --
                        [post_status] => publish
                        [required] => 0
                        [pandarepeaterfield_table] => member
                        [pandarepeaterfield_field_width] => 100
                        [pandarepeaterfield_entry_limit] => 0
                        [pandarepeaterfield_enable_load_more] => 0
                        [pandarepeaterfield_initial_amount] => 10
                        [pandarepeaterfield_enable_trash] => 0
                        [pandarepeaterfield_order_by] => pandarf_order
                        [pandarepeaterfield_order] => ASC
                        [pandarepeaterfield_display_order_info] => 0
                        [pandarepeaterfield_apply_admin_columns] => 0
                        [pandarepeaterfield_allow_reassign] => 0
                        [pandarepeaterfield_public_access] => 0
                        [roles_allowed] => administrator
                        [rest_pick_response] => array
                        [rest_pick_depth] => 1
                    )
    
            )
    
        [header_title] => Pods\Whatsit\Field Object
            (
                [args] => Array
                    (
                        [object_type] => field
                        [object_storage_type] => post_type
                        [name] => header_title
                        [id] => 315
                        [parent] => 313
                        [group] => 314
                        [label] => Header Title
                        [description] => 
                        [weight] => 0
                        [type] => wysiwyg
                        [sister_id] => -- Select One --
                        [post_status] => publish
                        [required] => 1
                        [wysiwyg_editor] => tinymce
                        [roles_allowed] => administrator
                        [rest_pick_response] => array
                        [rest_pick_depth] => 1
                        [old_name] => main_title
                    )
    
            )
    
        [header_image] => Pods\Whatsit\Field Object
            (
                [args] => Array
                    (
                        [object_type] => field
                        [object_storage_type] => post_type
                        [name] => header_image
                        [id] => 316
                        [parent] => 313
                        [group] => 314
                        [label] => Header Image
                        [description] => 
                        [weight] => 1
                        [type] => file
                        [sister_id] => -- Select One --
                        [post_status] => publish
                        [required] => 1
                        [file_format_type] => single
                        [file_uploader] => attachment
                        [file_attachment_tab] => upload
                        [file_upload_dir] => wp
                        [file_edit_title] => 1
                        [file_show_edit_link] => 0
                        [file_linked] => 0
                        [file_limit] => 0
                        [file_type] => images
                        [file_field_template] => rows
                        [file_add_button] => Add File
                        [file_modal_title] => Attach a file
                        [file_modal_add_button] => Add File
                        [roles_allowed] => administrator
                        [rest_pick_response] => array
                        [rest_pick_depth] => 1
                        [old_name] => main_background_image
                    )
    
            )
    
    )
    Thread Starter sinahosseinigst

    (@sinahosseinigst)

    See, I have one item added:
    https://gofile.io/d/3xV8aA

    Plugin Author Coding Panda

    (@codingpanda)

    @sinahosseinigst

    OK, looks like you changed “news” to “announcement” for the repeater field, so we need to update that.
    <?php
    $params= array(
    ‘orderby’ => ‘t.post_title DESC’,
    ‘limit’ => 25,
    );
    $news_pod= pods( ‘padra_content’, $params );
    $items= $news_pod->data();

    foreach( $items as $item ){
    $announcement = pods_field( ‘padra_content’, $item->ID, ‘announcement’ );
    print_r( $announcement );
    }
    ?>

    Please let me know if it is sorted.

    Thread Starter sinahosseinigst

    (@sinahosseinigst)

    @codingpanda Yeah! I got these:

    
    Array ( [0] => Array ( [id] => 8 [name] => asdasdasd [pandarf_parent_pod_id] => 313 [pandarf_parent_post_id] => 567 [pandarf_pod_field_id] => 345 [pandarf_order] => 1 [pandarf_created] => 2022-02-26 18:16:44 [pandarf_modified] => 2022-02-26 18:16:44 [pandarf_modified_author] => 1 [pandarf_author] => 1 [pandarf_trash] => 0 [news_title] => asdasd [news_text] => sdasdsa [news_image] => 246 ) )

    in the front end! Just how get the ‘asdasdasd’ or other values?

    Plugin Author Coding Panda

    (@codingpanda)

    They are stored in the array. Just need to use the keys in the array.

    <?php
    $params= array(
    ‘orderby’ => ‘t.post_title DESC’,
    ‘limit’ => 25,
    );
    $news_pod= pods( ‘padra_content’, $params );
    $items= $news_pod->data();

    foreach( $items as $item ){
    $announcement = pods_field( ‘padra_content’, $item->ID, ‘announcement’ );
    echo $announcement[‘name’] . ‘<br/>’;
    echo $announcement[‘news_title’] . ‘<br/>’;
    echo $announcement[‘news_text’] . ‘<br/>’;
    $image = wp_get_attachment_image( $announcement[‘news_image’], ‘large’ );
    if( ! empty( $image ) ){
    echo $image;
    }
    }
    ?>

    Thread Starter sinahosseinigst

    (@sinahosseinigst)

    Thanks, @codingpanda !

    Thread Starter sinahosseinigst

    (@sinahosseinigst)

    😀

Viewing 9 replies - 31 through 39 (of 39 total)
  • The topic ‘A weird glitch using Panda Pods Repeater Field causing all my content lost!’ is closed to new replies.