Custom listing template reviews showing for all listings

Steps to reproduce

  1. Add a new template for Listing.
  2. Add “Listing Tags” element by Hivepress.
  3. Add “Reviews” element by Hivepress.
  4. Save.

Actual result

The tags and reviews are showing all tags and reviews for all listings on every listing.

Expected result

It should only show the tags and reviews for the current listing.

Extra details

Before you ask, I have already tried disabling all other plugins and custom code.

Also, it works correctly on the listing page if I disable the template. It’s just the template elements that are doing this.

1 Like

Hi,

Thanks for reporting this, the bug is confirmed and we’ll fix it as soon as possible.

2 Likes

Any update on this? I am demonstrating the website I am building tomorrow night to a group of sponsors, and would like it to work properly for my demonstration. :slight_smile:

Hi,

Regarding Tags, I recommend checking out the RoadMap Tags Roadmap (01/02/2024) – Asana. As for Reviews, we will publish RoadMap soon.

So what you’re saying is that these are both going to be issues for awhile? Kind of disappointing that this can’t be fixed sooner. Especially since I paid for the tags extension, along with 5 other extensions. Don’t get me wrong, the extensions save me a bunch of time on custom development, but this bug unfortunately is an exception as I’ll need a fix very soon.

Regarding the reviews not working, I realized that I needed to use the Reviews (Related) element instead. Now that works.

Regarding the tags, for anyone else needing a substitute, here is the code I’m using to create a shortcode that displays the tags using the existing classes:

add_shortcode( 'sl_listing_tags', [ $this, 'tags' ] );
/**
 * Display tags since Hivepress is slacking :)
 * USAGE: [sl_listing_tags]
 *
 * @return string
 */
public function tags() {
    // Get the current post
    global $post;

    // Get the tags
    $tags = get_the_terms( $post, 'hp_listing_tags' );

    // Found?
    if ( !empty( $tags ) ) {
        
        // Start the container
        $results = '<div class="hp-listing-tags hp-block tagcloud">';

            // Iter
            foreach ( $tags as $tag ) {

                // Add it
                $results .= '<a href="/listing-tag/'.$tag->slug.'/" class="hp-listing-tag tag-cloud-link">'.esc_html( $tag->name ).'</a>';
            }

        // End the container
        $results .= '</div>';

        // Return it
        return $results;
    }
    return;
} // End tags()
2 Likes

Hi,

Thank you for your solutions. Yes, all updates will be released exactly with the described RoadMap.

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