Custom Fields
Re-Envisioned
Support General WP_query instead of rmwb_meta

  • Creator
    Topic
  • #31536
    info@ceescoenen.nl
    Participant

    I will add the WP_query to get related posts. I have a CPT DOEN. Each post has one or more related posts using the post-field. The default code rmwb_meta works but I want the Advanced Query Builder in Oxygen to get the related ID's.
    What is the correct WP_query?

    global $post;
    
    $field_id = "hoogtepunten";
    $post_id = rwmb_meta( $field_id );
    
    if ( $post_id) {
        echo '<h2 class="related-content-title">Bezienswaardigheden langs de route</h2>';
    
    echo '<div class="related-content">';
    
    foreach( $post_id as $post) {
        setup_postdata( $post ); ?>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.