Support » Plugin: Cleverness To-Do List » How to check if user has toDos?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Cindy Kendrick


    No, sorry, there’s no function like that in the plugin.

    Thank you for your reply.
    Could you guide me to a strategic place in your code where I could for example set a global variable or add a function: $CTL_current_user_has_todos

    Plugin Author Cindy Kendrick


    In my code I use CTDL_Lib::get_todos( $user, $limit, $status, $cat_id, $to_exclude ) to get a list. You can see the function in /cleverness-to-do-list/includes/cleverness-to-do-list-library.class.php on line #39.

    This may work outside the plugin, if it’s executed after the plugin is loaded. It’s just a WP_Query call, so you will need to loop through the results to display them.

    All items are stored in a custom post type called todo and all info is in meta values so you could also create your own WP_Query to get the info you need.

    The cleanest solutions seems to be the WP_Query for “todo”
    Great… Thank you 😉

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to check if user has toDos?’ is closed to new replies.