Forum Replies Created

  • Wait, now that I’m thinking about this (should have done this earliers, but is just popped up :-)) I can use a WP function to return the post id by using the slug!

    function get_ID_by_slug($page_slug) {
    	$page = get_page_by_path($page_slug);
    	if ($page) {
    		return $page->ID;
    	else {
    		return null;
  • Another thing I noticed that tabs still show up as an empty key:

    [custom_fields] => Array
                [blocks] => Array
                        [0] => Array
                                [acf_fc_layout] => content_block
                                [] => 
                                [title] => This is the title
                                [content] => This is the content
                                [fixed_bg] => 1

    Not sure if this has anything to do with it, since we are using multiple tabs… wp_cache_get sets the found to true, while the result is empty (api-field.php line 454)

  • Did another small test

    while ( has_sub_field('blocks') ) :

    Shows only the title.
    While using

    Shows the content key in the array

        [blocks_0_content] => Array
                [0] => Bla bla bla
        [_blocks_0_content] => Array
                [0] => field_53fc61e4d4240
Viewing 3 posts - 1 through 3 (of 3 total)

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.