Forum Replies Created

  • @dwpegues – Have you come across any solutions? I’m hitting the same problem. My current bandaid fix is to add an additional post type. So for me, tribe_event and post. Luckily for me, the client searches for all their related events with the relationship search field. For some reason, adding the additional post type fixes the save issue. Selected events then show. Very odd.

    It’s clearly a TEC issue / conflict. I was trying to think of ways to filter the result query but no success.

  • An old post, back to life!

    My solution for this is a function.

    function get_acf_field( $name, $id = null ) {
        $field = get_sub_field( $name, $id ) ? get_sub_field( $name, $id ) : get_field( $name, $id );
        return $field;

    Seems to work for my needs. Hopefully it’ll help others. This gives me the ability to use the same component within a repeater/flex content or standalone on a page/post. @hube2 Your idea would also be a good solution so that the component fields are always a sub field. That makes sense too. Probably a bit faster too than doing the conditional check for every field.

  • @damian-p – I ran into this as well. Also with Webpack. If I want to make the most efficient compiling, it would be nice to know what libraries are already loaded to prevent duplicates. I don’t think it’ll be possible to get the efficiency of React without building the site with React, or the like.

  • I think I gave up when I couldn’t get the component enqueued js to load earlier. I spent so much time trying all sorts of things to accomplish that. That was a good day or two of research. hah

  • Now that I think about it, after js / css optimization, it’s then in the header… On my local, I don’t have optimizations on, so functions.php was header, component enqueue was in the footer but it probably wouldn’t have had the flash if I had the optimizations on… I don’t like to develop with optimization on. D’oh.

  • That could be it. I was loading HighCharts which is a large library. However, when I enqueued HighCharts in functions.php, I didn’t have the flash. Perhaps its the size that was causing the issue and that slight earlier load time, helped.

  • Sorry to bring up an old thread. I’ve been recently doing this. I’m trying to figure out the performance hit of enqueuing a script / css via functions.php vs inside a component’s template. In the WordPress loading order, the component enqueue would be a bit later in time. Have you noticed a performance hit, or at least, a “flash” of something? I have once before with a charting library.

  • Too late to update the title, but perhaps “Detecting if its a sub field or not” would be good too…

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