The WordPress plugin I am currently writing restricts access to posts and pages and hides them for unauthorized users. In the options page for the setting I'd like to include overview tables that show what posts or pages actually have redirection or hiding enabled.
I am new to WordPress, PHP, HTML and CSS, so I find myself lost in creating this table. Currently the header misses left padding and the table is too wide (more noticable on fullscreen desktop).
The code uses an array
$hidden_pages that holds the page objects to be displayed. I just used some of the CSS classes from the WordPress page overview.
<table class="widefat striped"> <thead> <tr> <th scope="col" id="redirected-name">Name</th> </tr> </thead> <tbody> <?php foreach ( $marked_pages as $index => $page ): ?> <tr> <td> <a href="<?php echo get_the_permalink( $page->ID ); ?>"><?php echo get_the_title( $page->ID ); ?></a> </td> </tr> <?php endforeach; ?> </tbody> </table>
What are some ressources to learn more about tables, especially in the context of WordPress?