WordPress.org

Ready to get started?Download WordPress

Forums

SportsPress - All in One Sports Management
[resolved] Couple of questions please (9 posts)

  1. kev147
    Member
    Posted 2 months ago #

    Hi themeboy,

    Not been very active lately due to work but our season is about 6 weeks away so best start getting ready.

    Now im always on checking for updates and changes others have made and something i liked from someone's thread was a code for separating top two teams and bottom two for promotion and relegation could you tell me how you do this please (dotted lines)?

    Another thing if you see HERE how to centre all text in the results/schedule list please, and how can i rename ARTICLE and RECAP to something like "report" and "view"?

    Last thing is on a team page is it possible to eliminate players from been click-able so basically you cannot view a players profile only see their picture in their squad?
    many thanks pal
    kev

    https://wordpress.org/plugins/sportspress/

  2. ThemeBoy
    Member
    Plugin Author

    Posted 2 months ago #

    Hi Kev,

    This code will add a dotted line below the first 2 rows and above the last 2 rows:

    .sp-league-table tbody tr:nth-child(2) td {
    border-bottom: 1px dashed #000;
    }
    .sp-league-table tbody tr:nth-last-child(2) td {
    border-top: 1px dashed #000;
    }

    If you need to change where the lines appear, you can edit the number in the parentheses after nth-child and nth-last-child.

    For centering text in the event list, use this code:
    `
    .sp-event-list th, .sp-event-list td {
    text-align: center;
    }

    All frontend text can be modified via SportsPress > Settings > Text tab, including "Article" and "Recap".

    There is a setting in SportsPress > Settings > Players tab called "Link players" which can be unticked to disable linking to player pages from player lists, which are also used on team pages.

    Hope this helps!

  3. kev147
    Member
    Posted 2 months ago #

    Thanks Themeboy,

    I have found and fixed the things you said so much appreciated mate although un-checking players link option doesn't seem to work for me ? see HERE i have unchecked the option but you are able to still click and view players?

    Is there a option to highlight top two teams say GREEN and bottom two RED because im having problems with the dotted lines see HERE i have a table as such so no dots are visible unless im doing something wrong again which is quite possible

    I added the code as you said along with the centre text code which works btw but the dots don't show
    thanks

  4. ThemeBoy
    Member
    Plugin Author

    Posted 1 month ago #

    Hi Kev,

    For the highlighting you can use this CSS:

    .sp-league-table tbody tr:first-child td,
    .sp-league-table tbody tr:nth-child(2) td {
    background: #9f9;
    }
    .sp-league-table tbody tr:last-child td,
    .sp-league-table tbody tr:nth-last-child(2) td {
    background: #f99;
    }

    The dashed lines aren't making much of a difference because there is already a solid border added by your theme.

    I'll look into the player links and will keep you posted.

  5. kev147
    Member
    Posted 1 month ago #

    Thanks Themeboy that is miles better than dashed lines anyhow looks great HERE

    and ok Cheers pal

  6. teh1aeq
    Member
    Posted 1 month ago #

    Kev147, sorry to break in your thread. ;)

    Thanks for this CSS, ThemeBoy. It works very well. Only when you use the ranking widget (f.e. show only first 5 teams), the bottom team in the widget is coloured as well. Is there a way around this?

    Thanks in advance.

  7. ThemeBoy
    Member
    Plugin Author

    Posted 1 month ago #

    @teh1aeq There are a couple ways to do this:

    1. You can use the code above, and disable the background colors for the bottom 2 rows only in widgets by adding these lines:

    .widget_sp_league_table .sp-league-table tbody tr:last-child td,
    .widget_sp_league_table .sp-league-table tbody tr:nth-last-child(2) td {
    background: transparent;
    }

    2. You can modify the code so that instead of counting the bottom 2 rows, it counts X number of rows from the top. That way, shorthand tables i.e. widgets will not be affected. Here's an example that will color the 15th and 16th row red:

    .sp-league-table tbody tr:first-child td,
    .sp-league-table tbody tr:nth-child(2) td {
    background: #9f9;
    }
    .sp-league-table tbody tr:nth-child(15) td,
    .sp-league-table tbody tr:nth-child(16) td {
    background: #f99;
    }
  8. teh1aeq
    Member
    Posted 1 month ago #

    Thanks for your reply. Could have thought about the second option myself, but oh well. :)

  9. ThemeBoy
    Member
    Plugin Author

    Posted 1 month ago #

    Glad I could help :)

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.