• Resolved sevensoutbill

    (@sevensoutbill)


    Hi,

    I’m hoping someone can point me in the right direction. I’m displaying the next upcoming matches on my homepage and I need to display “Competition” along with the other details. Is there a way I can do that without touching code? Or, is there some code I can add to accomplish this?

    Thanks, guys!
    Bill

    https://www.ads-software.com/plugins/sportspress/

Viewing 4 replies - 1 through 4 (of 4 total)
  • Roch

    (@rochesterj)

    Hi Bill!

    You could use the match list shortcode for that, as long as your calendar gets data from all your competitions.

    Kind Regards,
    -Roch

    Thread Starter sevensoutbill

    (@sevensoutbill)

    Thanks for the suggestion, Roch. While that may work, it didn’t quite do what we needed to do. On the home page we are displaying the Next Match and Upcoming Fixture Visual Composer widgets from the Champion theme. In the end, we modified vc_next_match.php and vc_upcoming_fixtures.php to pull in and display the event’s competition/league name. If you’re interested here’s the code:

    // show competition / league
    $leagues = get_the_terms( $post->ID, 'sp_league' );
    if ( $leagues ):
    foreach( $leagues as $league ):
    $term = get_term( $league->term_id, 'sp_league' );
    $output .= '<h3>' . $term->name . '</h3>';
    endforeach;
    endif;

    Thanks to @alaaaaa who got me on the right track in this thread: https://www.ads-software.com/support/topic/i-need-to-customize-the-player-events-template?replies=24

    Happy coding!
    Bill

    Roch

    (@rochesterj)

    Hi Bill!

    That’s awesome, thanks a lot for sharing this! ??

    Kind Regards,
    -Roch

    Hello , where i must add this code ? When i add to the end of vc_next_match.php and vc_upcoming_fixtures.php ist nothing to do.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Display Competition in Next Match on home page’ is closed to new replies.