Support

Account

Forum Replies Created

  • I’ve found the problem. In my theme if got an offset. And that conflicted with the repeater field.

    This is the offset I used. I made an adjustment to is so it only works on the index.

    /* offset the default wordpress loop with 3 items */
    add_action('pre_get_posts', 'myprefix_query_offset', 1 );
    function myprefix_query_offset(&$query) {
    
        if ( !$query->is_home() ) {
    	    $offset = 3;
    	    $ppp = get_option('posts_per_page');
    	
    	    if ( $query->is_paged ) {
    	        $page_offset = $offset + ( ($query->query_vars['paged']-1) * $ppp );
    	        $query->set('offset', $page_offset );
    	    }
    	    else {
    	        $query->set('offset',$offset);
    	    }
        }
    
    add_filter('found_posts', 'myprefix_adjust_offset_pagination', 1, 2 );
    function myprefix_adjust_offset_pagination($found_posts, $query) {
    
        //Define our offset again...
        $offset = 3;
    
        //Ensure we're modifying the right query object...
        if ( $query->is_home() ) {
            //Reduce WordPress's found_posts count by the offset... 
            return $found_posts - $offset;
        }
        return $found_posts;
    }
  • Hi @acf-support,

    I did a var_dump including the page is. It was already in the loop. But the only thing I get back in the var_dump get_field is:
    string(1) “2”

    But in var_dump have_rows including the post id I still get:
    bool(false)

  • Hi @acf-support,

    I think I’ve set it correctly because I can fill it in the admin side in the custom post type I’ve created.

    There’s no problem when I save the post and I see the changes in the admin.

    It’s just that I can’t get the content in the front-end.

Viewing 3 posts - 1 through 3 (of 3 total)