Wordpress Dynamic Posts Table is an wordpress plugin using which bloggers can list posts for their job/news portal in a customized manner. Wordpress Dynamic Posts Table For Page
How to use
[catposts cat-name="post-category-name"]
The above shortcode should be added to the page,where you want to display posts from a particular category say Sports in a news portal
[catposts cat-name="Sports"]If you want certain number of posts to be displayed in a particular page then mention the posts count as illustrated below
[catposts cat-name="Sports" posts-count="12"]h6>Dependencies to get striped and centered table include
materializecss.min.cssto the head of your page . To enable the shortcode goto the functions.php of your theme and add this code
include( get_stylesheet_directory() . '/dynamicposts.php' );
upload this dynamicposts.php file to root folder of your website's currently active theme . Note:
post-category-name
must be replaced with the desired common category name .
e.g., we added the shortcode [catposts cat-name="IR"]
and got the display as below,
With the increase of the posts in a particular category the table rows will be generated dynamically, displaying specific post data as shown below NOTE:
⇓
Final Screenshot => dynamically displaying posts with last date taken from custom field
Replace the code Adding Custom Field Data to the last column of the table:
<td>Not Set</td>
</tr>';
By the below code ⇓
';?> <td>//start
<?php
$custom = get_post_custom();
if(isset($custom['YOUR-CUSTOM-FIELD-NAME']))
echo $custom['YOUR-CUSTOM-FIELD-NAME'][0];
else
echo 'Not Set';
?></td>
<?php echo '</tr>'; //end
❤ Cheers !
New
(31)
• Released: Oct 08, 2019, 01:15 PM
Wordpress Dynamic Posts Table For Page
Author: Proloy-Bhaduri
FREE
Wordpress Dynamic Posts Table is an wordpress plugin where bloggers can list their posts for job portal or news portal . size
git clone https://github.com/Proloy-Bhaduri/Wordpress-Dynamic-Posts-Table-For-Page.git