• Resolved ansibansi

    (@ansibansi)


    I’ve set two custom post types to use as rewrites… It seems to be ignored by the Guten Post Layout PlugIn (others use it). Any idea, why?

    function tabula_query( $query ) {
    	global $post;
    
    	
    		if( 'favbooks' === $query->get( 'post_type' ) ) {	
    				$query->set( 'post_type', 'books');
    				$query->set( 'relationship', 
    					array( 
    						'id' => 'tabula_lieblingsbuch_team',
    						'to' => $post->ID,
    					)
    				);			
    		} elseif ('recommendbooks' === $query->get('post_type') ) {
    			$query->set( 'post_type', 'books');
    			$query->set( 'relationship', 
    				array( 
    					'id' => 'tabula_empfehlung_team',
    					'to' => $post->ID,
    				)
    			);			
    		}
    	
    }
    add_action( 'parse_query', 'tabula_query', 10, 1 );
    • This topic was modified 3 years, 7 months ago by ansibansi.
Viewing 1 replies (of 1 total)
  • Plugin Author Deb Nath Utpol

    (@devutpol)

    Hi @ansibansi ,

    Please accept my apology for the late reply.

    Would you please open a support ticket here [https://gutendev.com/submit-ticket/]

    Our support team will help you to solve this issue.

    Regards,
    GutenDev

Viewing 1 replies (of 1 total)
  • The topic ‘pre_get_posts hook ignored?’ is closed to new replies.