Forum Replies Created

  • Quite frustrating that there’s no way to migrate any ACF based content without either cloning the entire site or using a $300 plugin. Massive design flaw IMHO.

    If you’re able to pass this on to the dev team @hube2 that would be great. (Or I can submit a request if that’s not possible.)

  • No longer relevant so guess this can be ignored since it can’t be deleted.

  • Been over a week… maybe I should submit this as a regular support ticket?

  • Thanks @hube2 .

    Any tips about where in the DB to look? I remember trying to find ACF fields in the past and got lost looking, also in the documentation.

    Maybe this helps… after another round of testing (with debugging turned on) I see these errors:

    [08-Sep-2021 13:57:35 UTC] PHP Notice: Trying to get property ‘ID’ of non-object in /www/htdocs/w01a2ea9/ on line 4044
    [08-Sep-2021 13:57:35 UTC] PHP Notice: Trying to get property ‘post_title’ of non-object in /www/htdocs/w01a2ea9/ on line 4046
    [08-Sep-2021 13:57:35 UTC] PHP Notice: Trying to get property ‘post_name’ of non-object in /www/htdocs/w01a2ea9/ on line 4048

    Looking at class-wp-query.php this appears (to my limited understanding) to be the code referenced when making queries in template files. Could this help explain why the post sort of “disappears” to the post query, although it is still visible (and marked published in the backend)?

  • When a new post is created doing the sync, what happens?

    First round is that it creates a draft, which is normal for the plugin.

    When an existing post is updated and fields that did not have values are populated, what happens?

    I can see the new text when viewing the post in the back end, but it does not become visible on the front-end until manually clicking publish.

    When an existing post is updated and fields that did not have values are populated, what happens?

    Same as above.

    What type of fields are they?

    Text and text area. Not sub-fields.

    Just did another test… a post listed as being published:

    And yet isn’t visible via post query until I hit Update again. Here’s the post query that I’m using, which shows a meta query for displaying only those that have been marked as a specific category (in Salesforce, not a WP category) and a checkbox for whether to make the post visible. (Its for a rudimentary inventory management process.)

    				$args = array( 'posts_per_page' => -1,  'post_type' => 'assets',
    				'meta_query'	=> array(
    						'relation'		=> 'AND',
    							'key'		=> 'area',
    							'value'		=> '["MITTE"]',
    							'compare'	=> '='
    							'key'		=> 'show_on_website',
    							'value'		=> 1,
    							'compare'	=> '='
    				$myposts = get_posts( $args );
    				foreach ( $myposts as $post ) : setup_postdata( $post );
  • Excellent! That really helps. Wouldn’t have guessed that it worked this way and was critical to being able to do a database search, since the standard wordpress search (in posts or custom posts) can’t see into the data in your fields.

    Would be LOVELY if there was an admin tool for this. 😉

    Screenshot attached to anyone looking at this in the future:

  • Revisiting this topic, as I’m working on another project where I have to find specific data in ACF fields.

    So I have a wysiwyg field with a key named field_59c990d0410b8. When using phpmyadmin, all I can find is one record for the settings for that field, not the actual content.

    Is the content stored somewhere else? In post_content perhaps?

    Are there any guides for doing searches on content entered into ACF? I couldn’t find anything, just lots of highly specific questions. So might be helpful to have a guide explaining this, since ACF content is not searchable using wordpress itself.

  • Anyone looking at old posts or should I submit a new one on the same issue?

  • Have the same issue and tried the code above, but its not working. Is ‘shop’ the page slug? I also tried the ID number but that didn’t work either.

    <?php $page_id = wc_get_page_id( 'shop' );
    $your_field = get_field( 'marquee', $page_id );  ?>
  • Found a super simple fix… since John thought the POST ID was getting lost with all of the switch to blogs, it occurred to me to simply add the post ID via this method:


  • Hi John, if by “before and after” you mean that I should use this code before the first switch to blog and then after the last one, then that’s what I’ve done here:

    The first ID is 256 which is the page linked above. The ID 277 is from the Coffee Job Berlin post which is the last post being pulled in on the right hand side of the page. So it would appear that my code for getting posts from three different subdomains (thats the coworking, consulting and coffee job berlin links on the right hand side) is not fully resetting back to the current site?

    Confused by your note “ACF will be using the current post ID here”. Everything I read said that switchtoblog is for getting the SITE ID, not post ID. And that restoreblog is for switching back to the SITE ID where the current page is.

    Very much appreciate your insights!

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