• Resolved Novac

    (@novac)


    I noticed that when I’m on any team’s page looking at the results and the upcoming games, there’s a line that says “N/A”. I’m not sure what that line is supposed to show, but I’d like to remove it. If that “N/A” wasn’t there, it would look exactly the way I want it.
    Can you tell me what I need to change to remove that?
    I have linked a particular team’s page for reference, but it happens for any team.

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • The N/A on this page is describing your venue locations per event.
    You can toggle this to Off to not show the venue under your events settings under SportPress –> Settings –> Games –> Display Venue

    Do you actually have N/A inserted as a ‘venue’ under Events –> Venues?

    https://support.themeboy.com/article/305-event-settings
    https://support.themeboy.com/article/49-adding-venues

    Thread Starter Novac

    (@novac)

    All events are assigned to a proper venue. If you click on an event from the team page, you’ll see the venue name and map.

    There must be another setting for the venue somewhere else?

    The code says to print N/A if you have the venue setting set to:
    – do not display venue,
    or
    – there are no venues

    <?php if ( !$show_venue || !$venues ): ?>
    <div style="display:none;" class="sp-event-venue" itemprop="location" itemscope itemtype="https://schema.org/Place"><div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"><?php _e( 'N/A', 'sportspress' ); ?></div></div>
    <?php endif; ?>

    Do you have anything custom on the site, or in your theme?
    Is this the default team page, or are you using a shortcode to display the events?

    I had the same matter and found that the <div style="display:none;" is never triggered even if I add Important!
    I guess this happens because it’s overrided by any previous div (i’ve not investigated about wich one).
    Anyway for the moment I’ve solved it removing the style from the line and adding an already sportspress coded class containing the property display:none.
    So my line now is as follows

    <?php if ( ! $show_venue || ! $venues ) : ?>
       <div class="sp-event-venue sp-tab-content" itemprop="location" itemscope itemtype="https://schema.org/Place"><div itemprop="address" itemscope itemtype="https://schema.org/PostalAddress"><?php esc_attr_e( 'N/A', 'sportspress' ); ?></div></div>
    <?php endif; ?>

    Maybe not the best solution, but now it works correctly as you can see here https://www.basketbattaglia.com/team/u-s-s-g-b-abbiategrasso/ (feel free to inspect it to see the result)

    • This reply was modified 3 years, 3 months ago by f3rr0.
    • This reply was modified 3 years, 3 months ago by f3rr0.
    • This reply was modified 3 years, 3 months ago by f3rr0.

    Sounds good.
    You could also just create that template in your child theme, and delete the loop entirely.

    Thread Starter Novac

    (@novac)

    I went to the settings page you referenced and Venue was unchecked in the Event Blocks section. I checked it and saved changes: Now the blocks show the Venue and below that is still the N/A. The only checkboxes I have checked in the Event Blocks section are “Display Calendar Title” and “Display Logos”. If I uncheck those too, the “N/A” still appears.
    I don’t have any significant changes to the theme code and would prefer to keep it that way.
    Edit: Originally I said it wasn’t the venue. The code does have it listed in the sp-event-venue class as you saw so that’s not correct. I just meant that the Display Venue checkbox was not the issue.

    • This reply was modified 3 years, 3 months ago by Novac.
    Plugin Contributor Savvas

    (@savvasha)

    Hi all!

    The described issue is fixed with the following patch which will be included to the very next update
    https://github.com/ThemeBoy/SportsPress/commit/80c475e44c99674f6476f8ba7198760611801e8d

    Thanks,
    Savvas

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Team Page Shows “N/A” on Each Game’ is closed to new replies.