Timeline for Adding <div> Automatically To <table> In Wordpress Using Filter Referencing?
Current License: CC BY-SA 3.0
7 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Mar 21, 2017 at 15:12 | comment | added | WebElaine |
It might be easier to change your CSS/JS to recognize <table> instead of <div class="table-responsive"> . If you namespace your body_class you can get higher levels of specificity and hopefully target what's needed, without a need to adjust user-generated markup.
|
|
Mar 20, 2017 at 21:47 | comment | added | NiamLeeson | Yes that is how the tables are being added. The reason I need this to work is because I have users that are not tech savvy who just need to be able to use the table generator and have it work correctly on mobile devices automatically. | |
Mar 20, 2017 at 21:27 | comment | added | czerspalace | Are you adding the tables using the post editor? | |
Mar 20, 2017 at 21:06 | comment | added | NiamLeeson |
The <table> elements are on various pages, and are not using any shortcodes.
|
|
Mar 20, 2017 at 20:45 | comment | added | Nathan Johnson |
Is the <table> part of the page, post, or custom post type? If it's not, then the_content filter won't work. If you're using a shortcode to display the table, then you may need to change the priority (10) to a higher number link 9999.
|
|
Mar 20, 2017 at 20:40 | comment | added | NiamLeeson | I tried adding this code to my functions.php file, but it doesn't seem to have any effect. | |
Mar 20, 2017 at 20:30 | history | answered | Nathan Johnson | CC BY-SA 3.0 |