Attributes visibility and listing tabs

Hello! I have a few questions regarding the project I’m currently working on (I’ve browsed threads on the forum, sorry if these issues have already been discussed; in that case, a link to the threads would be sufficient).

  1. I added tabs to the listing view using:
add_filter(
    'hivepress/v1/menus/listing_manage',
    function( $menu ) {
        $menu['items']['opinie'] = [
            'label'  => 'Opinie',
            'url'    => 'custom url here',
            '_order' => 123,
        ];

        return $menu;
    }
);

How can I create pages for these tabs where specific listing attributes will be visible?

  1. Is it possible to somehow synchronize attribute values from the vendor’s panel with the values of attributes in “Add Listing”? (The seller adds attributes in their panel, and when they click “Add Listing,” the fields are automatically filled, and vice versa.)
  2. Can I somehow place forms to change vendor data on different pages? For example, I created vendor attributes: education, price. I would like to change education in a form at: domain.com/page1 and change the price at: domain.com/page2

Hi,

Sorry for the delay.

  1. Yes, you can add a custom URL to the tabs menu this way, but creating custom pages that inherit the listing layout and context is more complex. This would require creating a custom extension and adding templates that inherit the Listing_View_Page template, also a custom URL route is required that will render this template and pass a context to it. You can check the Listing_Edit_Page as an example here hivepress/includes/templates/class-listing-edit-page.php at master · hivepress/hivepress · GitHub Also you can check the dev docs, references, etc. Unfortunately, dev docs have no 100% coverage yet but we plan to extend them.

  2. Yes, this feature is actually available if you download the latest version from GitHub Release 1.7.1.1 · hivepress/hivepress · GitHub There’s a “sync value with vendors” checkbox in the listing attribute settings, if both attributes have the same field name then their values will be in sync.

  3. Yes, but this requires advanced customizations (e.g. creating custom forms via a custom extension), if you added attributes and marked them as Editable they’ll appear in the user profile settings form anyway.

Hope this helps.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.