Automatically add class to link based on link text

If I understand it correctly you want a visual indicator for departures relevant on the current time. One solution will be using Javascript and provide a way for the element to be identified as passed or active schedule time. HTML <div id=”myElement”> <a href=”https://myawesomenewsite.com/departuretime/1253″>1253</a> <a href=”https://myawesomenewsite.com/departuretime/1255″>1255</a> <a href=”https://myawesomenewsite.com/departuretime/0955″>0955</a> <a href=”https://myawesomenewsite.com/departuretime/2213″>2213</a> </div> JAVASCRIPT // find elements … Read more

Use the wordpress admin table

Include and extend the WP_List_Table class class Example_List_Table extends WP_List_Table Best way to learn this is to modify the custom list table plugin: https://wordpress.org/plugins/custom-list-table-example/ For a full tutorial check this out: https://www.sitepoint.com/using-wp_list_table-to-create-wordpress-admin-tables/ And read the codex here: https://codex.wordpress.org/Class_Reference/WP_List_Table

WordPress posts [closed]

There are multiple ways to accomplish this, depending on your expertise and specific needs. First of all, you have not specified how these four posts are selected. Do you want to select them manually in the backend? Or are they the 4 most recent posts? Or random? Or from a specific category? Depending on the … Read more

How create a shortcode with html

Please use below code function html_show($atts) { $makearr = explode(“,”,$atts[‘content’]); if(isset($makearr) && !empty($makearr)) { foreach($makearr as $arrval){ $stringli .= ‘<li>’. $arrval.'</li>’; } } else { $stringli = ”; } $htmlcode=”<div class=”notify”><span class=”symbol icon-fact”></span> <strong>A kind of a notice box !</strong><ul>”.$stringli.'</ul> </div>’; return $htmlcode; } add_shortcode( ‘htmltag’, ‘html_show’ ); /*******Using method*******/ echo do_shortcode(‘[htmltag content=”message1,message2,message3,message4″]’);

How to implement custom URL handler to access JS modal content? [closed]

You could try with javascript, the following logic: On page load check if a hash exist in the url with something like: var hash = decodeURIComponent(location.hash.substr(1)); Then you would have two tables (one for team and one for advisors) with names matching the urls of your modals (e.g.: https://greentec-capital.com/team/peter-grouev/) like: var teamHashes = [‘peter-grouev’, ‘erick-yong’]; … Read more