0

Hi I Know little of coding but hoped the following is possible by using custom css

I am using a short code to insert a table into a wordpress page and I want the particular word at to be replaced by v example Leopards at Lions changes to Leopards v Lions

I have looked at the source code where the table appears and this looks like this

<table class='mstw-lm-table mstw-lm-schedules mstw-lm-table_catsleague' >
<thead><tr>
<th>Match Fixtures</th><th>Score</th><th>Round</th></tr></thead>
<tbody>
<td><div class='league-schedule-matchup'><div class='away-team-logo'></div>Leopards at Lions<div class='home-team-logo'></div></div></td><td> 5-23</td><td><a href='cats-league-201718/' target='_blank'>Round 1</a></td></tr><td><div class='league-schedule-matchup'><div class='away-team-logo'></div>Tigers at Pumas<div class='home-team-logo'></div></div></td><td> 37-7</td><td><a href='cats-league-201718/' target='_blank'>Round 1</a></td></tr><td><div class='league-schedule-matchup'><div class='away-team-logo'></div>Pumas at Lions<div class='home-team-logo'></div></div></td><td> 33-3</td><td><a href='cats-league-201718/' target='_blank'>Round 2</a></td></tr><td><div class='league-schedule-matchup'><div class='away-team-logo'></div>Tigers at Leopards<div class='home-team-logo'></div></div></td><td> 10-16</td><td><a href='cats-league-201718/' target='_blank'>Round 2</a></td></tr><td><div class='league-schedule-matchup'><div class='away-team-logo'></div>Leopards at Lions<div class='home-team-logo'></div></div></td><td>TBA</td><td><a href='cats-league-201718/' target='_blank'>Round 3</a></td></tr><td><div class='league-schedule-matchup'><div class='away-team-logo'></div>Pumas at Leopards<div class='home-team-logo'></div></div></td><td>TBA</td><td><a href='cats-league-201718/' target='_blank'>Round 3</a></td></tr><td><div class='league-schedule-matchup'><div class='away-team-logo'></div>Lions at Tigers<div class='home-team-logo'></div></div></td><td>TBA</td><td><a href='cats-league-201718/' target='_blank'>Round 4</a></td></tr><td><div class='league-schedule-matchup'><div class='away-team-logo'></div>Pumas at Leopards<div class='home-team-logo'></div></div></td><td>TBA</td><td><a href='cats-league-201718/' target='_blank'>Round 4</a></td></tr><td><div class='league-schedule-matchup'><div class='away-team-logo'></div>Lions at Tigers<div class='home-team-logo'></div></div></td><td>TBA</td><td><a href='cats-league-201718/' target='_blank'>Round 5</a></td></tr></tbody></table>

hope this makes sense and is possible and as I Said my limit will be adding custom css

Zoli Szabó
  • 4,366
  • 1
  • 13
  • 19
  • 1
    Your HTML is invalid. You have 9 unpaired closing `` tags.. – BeerusDev Oct 22 '21 at 17:24
  • The code is generated by a wordpress plugin and although as you say its invalid it does appear to work – PAMELA WHITING Oct 22 '21 at 17:33
  • It is working now but sometimes it will behave unexpectedly – Rana Oct 22 '21 at 17:38
  • You have to use JavaScript for that to replace `at` to 1v` using `replace('at', 'v')` – Rana Oct 22 '21 at 17:39
  • No way to achieve this using (only) CSS. Best to change text at its source (the database) or as close to the source as possible (e.g. with a custom WordPress filter - most probably hooked to `the_content`). – Zoli Szabó Oct 22 '21 at 18:33
  • I think this is beyond me but was going to try to add Javascript to the particular page. I have found a sample and have added Rana suggested code but no idea if I have done this correctly function wpb_hook_javascript() { if (is_page ('202')) { ?> – PAMELA WHITING Oct 22 '21 at 19:00

0 Answers0