Forum Replies Created

Viewing 6 Topics - 1 through 6 (of 6 total)
Author Posts
Dan Dan

There was a typo, here is the fixed version:

//Redirect WPUF Version: 2.2.6
function wpuf_force_redirection($response, $post_id) {
 
        $post_type = get_post_type($post_id);
       
        if($post_type == 'type1'){
   
        //get parent post
        $related_id = get_post_meta($post_id, 'related_id', true);
       
        //If parent found, update $response
        if ($related_id) {
                //Update Response Vars
                $response['redirect_to'] = get_permalink($related_id);
        }
       
    }elseif($post_type == 'type2'){
   
        //Update response to new post url
        $response['redirect_to'] = get_permalink($post_id);
       
    }
    return $response;
}
add_filter('wpuf_add_post_redirect', 'wpuf_force_redirection', 10, 2); //10: priority, 2: accepted vars
add_filter('wpuf_update_post_redirect', 'wpuf_force_redirection', 10, 2);
Dan Dan

I was thinking you could add this to the documentation. There are examples for the other filters, but not redirection. You could add this as an example to help out users.

May 17, 2014 at 10:03 pm in reply to: Product Loses Formatting When Saved 20633
Dan Dan

Note: The dashboard pages are “sub” pages. This may be why they are not working correctly.

marketplace-dashboard
marketplace-dashboard/orders

May 17, 2014 at 9:42 pm in reply to: Product Loses Formatting When Saved 20631
Dan Dan

Here is a video that shows what is happening.

1) When I save a product, the paragraph formatting is lost.

2) When I browse orders the pagination does’t work.

https://www.dropbox.com/s/9x0mncy2vum2ruo/festytribe-dokan.mov

February 18, 2014 at 11:40 pm in reply to: Menus not working correctly 15610
Dan Dan

I figured it out.

You need to change line 65 in header.php

'menu' => 'top',

February 18, 2014 at 11:09 pm in reply to: Menus not working correctly 15608
Dan Dan This reply has been marked as private.
Viewing 6 Topics - 1 through 6 (of 6 total)