The dashboard conveniently tells me how many posts, pages, and comments I have. I would like it to tell me how many articles, videos and cartoons I have too (three custom post types registered with my theme). How would I go about including these into the “Right Now” panel on the dashboard?
Leave a Reply
You must be logged in to post a comment.
Yes, there are several actions within that widget, including
right_now_content_table_end
. Example:Based on this same code, you may use this to show every custom post types and custom taxonomies count :
For anyone interested in changing the “Discussion” section to show the pending post count instead of having it all in “content” the right_now_discussion_table_end hook can be used like so:
I also removed the
if(pending >0)
this way the post types will line up with the count on the left. If you use this code just use Sébastien or Adam’s code for the counts and remove the pending section.Also note, I added a check to see if the post types were public and set to show in the UI. This can be added to either of the other’s code.