by Garth | Mar 17, 2019 | PHP, Wordpress
<?php $category = get_terms(‘gallery_albums’);//custom category name foreach ($category as $catVal) { $AlbumName[] = $catVal->name; } echo “<pre>”; print_r($AlbumName); echo “</pre>”;...
by Garth | Mar 4, 2019 | PHP, Wordpress
<?php $category = get_terms(‘task_categories’);//custom category name foreach ($category as $catVal) { echo ‘<h2>’.$catVal->name.'</h2>’; } ?>
by Garth | Jan 9, 2019 | PHP, Wordpress
WPBeginner function posts_for_current_author($query) { global $pagenow; if( ‘edit.php’ != $pagenow || !$query->is_admin ) return $query; if( !current_user_can( ‘edit_others_posts’ ) ) { global $user_ID; $query->set(‘author’,...
by Garth | Sep 3, 2018 | PHP, Wordpress
<?php edit_post_link(‘Button Text’); // Always handy to have Edit Post Links available ?>
by Garth | Sep 3, 2018 | PHP, Wordpress
Firstly you have your while loop to run through all your posts. And above your while loop you have your args. You need to add this arg $args[‘paged’] = $paged; Below is a template to start your while loop $args[‘post_type’] =...
by Garth | Jul 30, 2018 | PHP, Snippets, Woocommerce, Wordpress
Click link below WPBeginner