Title: WPUF Table
Last modified: July 15, 2020

---

# WPUF Table

 *  [colt5034](https://wordpress.org/support/users/colt5034/)
 * (@colt5034)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/wpuf-table/)
 * Hello,
 * Hopefully someone can help.
 * I am looking to hide a button on the URL provided when there is an entry in the
   table above it.
 * The table appears when a user creates a post (custom post type). The table is
   a shortcode from the WordPress User Frontend Plugin (WPUF) please see link:
    
   [https://wedevs.com/docs/user-dashboard/](https://wedevs.com/docs/user-dashboard/)
 * I cannot find the right function to attach the conditional visibility to and 
   any help would be most appreciated as I know this is a more specific and obscure
   request.
 * Thanks in advance
 * Kind regards
    Colin Tait
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fwpuf-table%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  Plugin Author [Jonathan Horowitz](https://wordpress.org/support/users/jhorowitz/)
 * (@jhorowitz)
 * [5 years, 8 months ago](https://wordpress.org/support/topic/wpuf-table/#post-13163202)
 * Hi [@colt5034](https://wordpress.org/support/users/colt5034/),
 * This plugin appears to be displaying a custom post type.
 * This code returns the number of published posts in the post type ‘your-custom-
   post-type’:
    `wp_count_posts('your-custom-post-type')->publish`
 * You could write something like this in your theme’s functions.php
 *     ```
       function my_theme_has_published_posts_of_type($type) {
         return wp_count_posts($type)->publish > 0;
       }
       ```
   
 * and then use it in the visibility screen as
    `!my_theme_has_published_posts_of_type('
   the type you are putting in the shortcode')` (notice the ! in the front, since
   we only want to show the content if it _does not_ have any posts of that type!)
 * Let me know if that helps! Thanks!

Viewing 1 replies (of 1 total)

The topic ‘WPUF Table’ is closed to new replies.

 * ![](https://ps.w.org/content-visibility-for-divi-builder/assets/icon-256x256.
   png?rev=1359961)
 * [Content Visibility for Divi Builder](https://wordpress.org/plugins/content-visibility-for-divi-builder/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-visibility-for-divi-builder/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/)
 * [Active Topics](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-visibility-for-divi-builder/reviews/)

## Tags

 * [wpuf](https://wordpress.org/support/topic-tag/wpuf/)

 * 1 reply
 * 2 participants
 * Last reply from: [Jonathan Horowitz](https://wordpress.org/support/users/jhorowitz/)
 * Last activity: [5 years, 8 months ago](https://wordpress.org/support/topic/wpuf-table/#post-13163202)
 * Status: not resolved