Custom Fields
Re-Envisioned
Support MB Relationships Using the shortcode

  • This topic is empty.
  • Creator
    Topic
  • #17312
    IvanPopov
    Participant

    Alrighty, should be a simple one, I have the following going on to get relationships:

    add_action( 'mb_relationships_init', function () {
        MB_Relationships_API::register( array(
            'id'   => 'cat_to_cat',
            'from' => array(
                'object_type' => 'term',
                'taxonomy'    => 'product_cat',
            ),
            'to'   => array(
                'object_type' => 'term',
                'taxonomy'    => 'product_cat',
            ),
        ) );
    } );

    Having chosen the from/to in the product category like this:

    Relationships

    And then on a new page i have the short code like this:

    [mb_relationships id="cat_to_cat" direction="from" mode="ul"]

    But it does not display anything? Do i need to list the ” items=”90924″ ” in the shortcode or do i need to do this via php? End goal is to get a category list going like this:

    List

    Thank you!

  • You must be logged in to reply to this topic.