Support » Plugin: Manual Related Posts » Order of Related Posts?

Viewing 7 replies - 1 through 7 (of 7 total)
  • cgossy


    I’m facing the same poblem

    Until this is supported by the pluging, I fixed this problem and changed “wp-content\plugins\baw-manual-related-posts\inc\”

    function bawmrp_get_related_posts

    function bawmrp_get_related_posts( $post_id, $only_published=true )
    	global $bawmrp_options;
    	$ids = get_post_meta( $post_id, '_yyarpp', true );
    	if( $only_published ){
    		//$published_ids = !empty( $ids ) != '' ? implode( ',', wp_parse_id_list( wp_list_pluck( get_posts( array( 'include' => $ids, 'post_type' => $bawmrp_options['post_types'] ) ), 'ID' ) ) ) : array();
    		$published_ids = !empty( $ids ) != '' ? wp_parse_id_list( wp_list_pluck( get_posts( array( 'include' => $ids, 'post_type' => $bawmrp_options['post_types'] ) ), 'ID' ) )  : array();
    		$ids = array();
    		foreach ($orig_order as $id){
    			if (in_array($id,$published_ids))
    		$ids = implode( ',',$ids);
    		$ids = !empty( $ids ) != '' ? implode( ',', wp_parse_id_list( $ids ) ) : array();
    	return $ids;

    PLEASE Note that the changes will be deleted if you update the plugin!

    Hey cgossy,

    Thanks! That works to get them in the order that I input them. Next step would be to have the drag & drop re-ordering actually affect the order of displayed posts.
    This is great though and client is happy enough 😉
    – Trevor


    Drag&Drop the related posts in the correct order and than press the “save” button of your post/page

    You don’t have to do any code changes for that.


    Hm, maybe that’s a problem with my particular install then. “Publish” or “Update” for the post doesn’t save the drag n drop order. And there is no further “save” button.

    Did you check the cache settings of the plugin (Parameter “Caching data” on the plugin settings page)? If it is greater than 0 then your drag&drop changes will take effekt after the number of days that are set in the cache parameter .

    Set it to 0 for your Tests

    (And yes, I meant the “Publish” and “Update” button)

    oh geez. *face-palm*
    Yeah my caching wasn’t 0. Thanks so much for all your help cgossy!


    your’re welcome

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Order of Related Posts?’ is closed to new replies.