iframes

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #34317
    Rebecca RobertsonRebecca Robertson
    Participant

    Hello.

    I am trying to add a frontend post edit form that contains a WYSIWYG editor where the post content goes, but it is not showing the content from the post.

    What am I doing wrong?

    #34335
    Rebecca RobertsonRebecca Robertson
    Participant

    Also, when adding fields that use iframe (such as single image) to the frontend or when clicking on the add media button of a frontend form, the iframe breaks the page. The content of the page disappears and the iframe content shows up under the footer of the page.

    https://drive.google.com/file/d/1dYpe32iF6MNcMiYSEkwRoxK1H4RKSLU_/view?usp=sharing

    You can see the add media button there above the content edit box. For some reason when you click on it though, this is what happens:

    https://drive.google.com/file/d/1jSJNR4rCnwKKirlMUNgDP-l3k2CAPQ5U/view?usp=sharing

    #34351
    Long NguyenLong Nguyen
    Moderator

    Hi Becky,

    You can try to remove the sanitization of the field WYSIWYG and use the field ID post_content to show the post content in the field area. Refer to the documentations
    https://docs.metabox.io/sanitization/
    https://docs.metabox.io/extensions/mb-frontend-submission/#reorder-post-fields

    #34524
    Rebecca RobertsonRebecca Robertson
    Participant

    That didn't help.

    This is the add image button I'm talking about. To allow authors to add a featured image to a post.
    clicking on it opens the iframe in the wrong place and breaks the page. Changing the sanitize_callback has no effect on it whatsoever.

    #34525
    Rebecca RobertsonRebecca Robertson
    Participant

    Additionally, where would you put the code for the reordering of post fields? In the functions file or on the page where you are calling the form?

    #34537
    Long NguyenLong Nguyen
    Moderator

    Hi Becky,

    Re-order post fields mean using the custom fields with the same IDs as the default WordPress field IDs. The code would be added in the file functions.php when registering the meta box and custom fields.

    Regarding the featured image issue. Can you please deactivate all plugins except Meta Box, MB extensions and switch to the standard theme of WordPress then re-check the issue?

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.