• Resolved nulledprofile

    (@hugomarcelo)


    How to change the order of content in the post?
    Example:
    1st Images sent by the user
    2nd Description sent by the user (post text)

    Even if I change the order of the fields in the front-end post form, the post still shows the content first, then the images …
    I want the images first, above the text. That’s terrible.
    It is necessary to change the order of the content of the post to be created.

Viewing 1 replies (of 1 total)
  • Hello @hugomarcelo,

    I am so sorry to inform you it will be unavailable to control the position of post content from WPUF. WPUF only allows you to set post form fields. After the post is submitted, by default, WPUF is unable to rearrange the content.

    This will require customization. You can use the hook wpuf_add_post_after_insert to edit the appearance of the content inside the post, after the user submits it. You can run any code, maybe save some custom fields or run some special events when a new post is created.

    Here is an example:

    function wpufe_update_post_price( $post_id ) {
    $price = get_post_meta( $post_id, '_price', true );
    
    update_post_meta( $post_id, '_regular_price', $price );
    }
    
    add_action( 'wpuf_add_post_after_insert', 'wpufe_update_post_price' );

    regards,

Viewing 1 replies (of 1 total)
  • The topic ‘Order of post content’ is closed to new replies.