Two Way Relationships - WordPress Advanced Custom Fields for Beginners (16)

Поділитися
Вставка
  • Опубліковано 24 гру 2024

КОМЕНТАРІ • 29

  • @cuaran89
    @cuaran89 4 роки тому +6

    Hi, your videos are literally saving my life. I wanna tell you why.
    Most of plug-ins and 3rd party tools for ACF work with Elementor.
    I am using Thrive Themes, and their Elementor competitor Thrive Architect.
    ACF has documentation about Elementor but no for Thrive Themes, additionally, Elementor has a plug in called Dynamic Fields for Elementor that does what you are doing here.
    So, after al of this, I finally see the light and the end of the tunnel with your videos. I know I have to code a lot of things, but at least it will work.
    Thanks a lot for your time and doing this videos. You have a new satisfied subscriber.
    Hope I can bring you some questions while doing the tests between ACF and Thrive Themes.
    Best.

  • @mrdigitalau
    @mrdigitalau  2 роки тому +3

    Sorry peeps - I made a mistake, you might find the query returns all relations, make sure to add an array inside the meta_query, so an array within an array! My bad!
    'meta_query' => [
    array(

    'key' => 'locations',
    'value' => '"' . get_the_ID() . '"',
    'compare' => 'LIKE'
    )
    ]

  • @tanvirhossain-j6j
    @tanvirhossain-j6j Рік тому

    Hi,
    I would like to know how did you break the Hierarchy of WordPress?

  • @YasirNoor-q8w
    @YasirNoor-q8w Рік тому

    Hi, I am facing an issue while using your scenario and building my own taxonomies. I have 2 Custom Post Type One is a Question and the other one is a Certificate the same concept is TWO-way relation to show their results but when I get done with all the codes they show me all the posts while only showing me the assigned posts but didn't. Please assist me what's the reason behind me code of either ACF conflicting with their libraries. Urgent support.

  • @johanstam3602
    @johanstam3602 2 роки тому

    How do I get the ACF fields associated with the post type? Cause that's not in the post object.

  • @philip9677
    @philip9677 4 роки тому

    Hi sean was wondering when do we use if have posts while have posts and when do we use the foreach loops, will both for querying

  • @StanleyBateswar
    @StanleyBateswar 4 роки тому

    Hi Ive applied only the location Sydney to Bob Smith but still I see on the Melbourne location that BoB Smith is displayed overthere. Hows that possible?

    • @self2008self
      @self2008self 4 роки тому +3

      $args = [
      'post_type' => 'team_members',
      'meta_query' => [ array (
      'key' => 'locations',
      'value' => '"' . get_the_ID() . '"',
      'compare' => 'LIKE')
      ],
      ];
      Hey. Do like this.

    • @younesselaachiq3671
      @younesselaachiq3671 4 роки тому

      @@self2008self Yeah i get the same problem and i solved it by seing the example in there documentation but why it worked for him and didn't worked for me ? ?

    • @Bobbybazooka
      @Bobbybazooka 4 роки тому

      @@self2008self Thank you . Was lookin at the code and woundering what was wrong :D

    • @stevanantic3019
      @stevanantic3019 3 роки тому

      Hey did you found fix ? i have same issue..

    • @nilmonimustafi236
      @nilmonimustafi236 3 роки тому

      @@younesselaachiq3671 he had only team member post

  • @nitingujar7938
    @nitingujar7938 2 роки тому

    sir basically i have three Custom post type like Topic,Sections,tutorials.....okey , Now sections and tutorials are relationship with topic CPT,now i want to build two way relationship between topic and tutorials meanse i want to show the sections and tutorials which will be added in topic CPT with Acf on tutorial CPT.How its is possible ...means how i creat two way relationship between three post type ..

  • @vigneshkarthik4488
    @vigneshkarthik4488 2 роки тому

    How to display featured images if team member has image?

  •  4 роки тому

    Great Help!
    I dont know if my php version is different but form me the array notation youre using returnded all team members. Found a solution declaring an array inside the meta_query array.

    • @elcondorito8823
      @elcondorito8823 4 роки тому

      Yes, I have the same problem...
      Did you solve it ?
      EDIT : Find out the comment in the comment just below.

    • @mrdigitalau
      @mrdigitalau  2 роки тому

      Sorry Ramses that was my bad.

  • @corumeach
    @corumeach 3 роки тому

    Can ACF and custom types handle multiple relationships based on a date or time period? Like assigning Sean to Sydney from 2010-2012 and to Melbourne from 2013-2020? Field-to-field relationships work fine but, for example, representing multiple bands a musician was a member of over the years (showing the exact years with each band) seems to be quite difficult.

    • @mrdigitalau
      @mrdigitalau  3 роки тому +1

      That's a bit more complicated. I haven't looked at how it could be done using ACF unfortunately. It's called a BelongsToMany relationship whereby you have a pivot table between Person and Location. I can easily code that out using Laravel, check our Laravel, it might be the better solution for something complicated like that. Sorry I couldn't help you there.

    • @corumeach
      @corumeach 3 роки тому

      @@mrdigitalau Thank you for your response. :)

  • @슨제이-r2r
    @슨제이-r2r 4 роки тому

    Great!! How did you learn Wordpress?

  • @SunilButolia
    @SunilButolia 2 роки тому

    if team member has multiple locations then how to separate location with a comma ?

    • @mrdigitalau
      @mrdigitalau  2 роки тому +1

      You can do a foreach loop of each location and only show the comma if the item is not the last item

  • @petruciucur
    @petruciucur 4 роки тому +1

    Excellent ! Thanks a lot !

  • @lordpopcwrn4755
    @lordpopcwrn4755 10 місяців тому

    YOU ARE GOD

  • @thefreshweb
    @thefreshweb 3 роки тому

    ✨💖