I was wondering if there was a way to display the view count of custom post types in WP-Admin? (In column form, similar to how normal post views are displayed)
EX: Portfolio items
Great work on the plugin!
You should ideally be able to view the columns. I’ve had success displaying the two columns on custom post types created by the Types plugin. ( http://wp-types.com/ )
Do you see your custom post types when you goto the Top 10 Settings page?
Thanks for the response! I believe I may know what’s causing the problem.
My theme has an option to change the portfolio post type name. I have changed my portfolio post type name to “”Tutorials”.
Top 10 sees “Portfolio” as one of the custom post types, but doesn’t see “Tutorials”, which is why I believe I’m not seeing any statistics in the columns.
If so, any way to add custom post type to Top 10?
Thanks for your help!
Which theme is this?
Is “Portfolio” the same as “Tutorials” ?
It’s a theme on Themeforest called Thunder: http://themeforest.net/item/thunder-responsive-multipurpose-theme/5466969
Yes, the Portfolio is the same as “Tutorials” in a sense. Only difference is that the post type name is renamed from “portfolio” to “tutorials”. This is a feature of the theme that changes the post type name.
Other plugins are recognizing “Tutorials” as a custom post type. Only Top 10 is not recognizing the custom post type.
Could you please post a picture of the General Options, similar to this?
Here’s a screenshot of the General Options: http://oi42.tinypic.com/2ceiwqf.jpg
As you can see, “portfolio” post type is recognized, but not “tutorial”. Any solution would greatly be appreciated 🙂
Do you know how the theme “renames” the custom post type. My plugin reads the post types as they are stored in the database using get_post_types
Sorry, my mistake Ajay. The theme simply changes the label of it, doesn’t actually change the name of the custom post type.
I believe the theme used this plugin for for the portfolio post type: https://github.com/devinsays/portfolio-post-type
And used this to enable the portfolio post type:
Any help would be appreciated.
Thanks for your time!
I should have asked you this earlier, I notice you have several other post types as well. Are you able to see columns for them.
Just to be sure I totally didn’t misunderstand, you’re referring to the Total Views and Daily Views columns in the Posts > All Posts page that you want on the Custom Post Types pages?
Yes, I am referring to the column of statistics (Total View/Daily View) in the Posts>All Posts page.
I do not see them for other custom post types (except for WooCommerce products).
By any chance, do you see the columns under Screen Options dropdown at the top?
No, there aren’t any view options under Screen Options for my custom post types. They are only visible for regular Post, Pages, and WooCommerce Products.
Hi, Not sure if I’m in the right forum but here goees:
The home page of my site, http://www.sportsreporters.com, used to contain four rotating photos that corresponded to the four most recent articles posted. Now, it looks like this:
Warning: include(/home/vg008web00/55/86/3018655/web/wordpress//wp-content/plugins/content-gallery/gallery.php) [function.include]: failed to open stream: No such file or directory in /home/vg008web00/55/86/3018655/web/wordpress/wp-content/themes/playmaker2/home.php on line 25
Warning: include() [function.include]: Failed opening ‘/home/vg008web00/55/86/3018655/web/wordpress//wp-content/plugins/content-gallery/gallery.php’ for inclusion (include_path=’.:/usr/share/php:/usr/share/pear’) in /home/vg008web00/55/86/3018655/web/wordpress/wp-content/themes/playmaker2/home.php on line 25
Can someone please help me? Thanks.
VinhSonNguyen, I’m kind of lost on this point, because the code I use should display it for all custom post types.
Do you know how the WooCommerce extensions add the column?
I use the following in admin.inc.php
add_action('manage_posts_custom_column', 'tptn_value', 10, 2);
- The topic ‘View Count with Custom Post Types in WP-Admin’ is closed to new replies.