WordPress.org

Support

Support » Plugins and Hacks » Top 10 - Popular posts plugin for WordPress » [Resolved] View Count with Custom Post Types in WP-Admin

[Resolved] View Count with Custom Post Types in WP-Admin

Viewing 15 replies - 1 through 15 (of 17 total)
  • Plugin Author Ajay

    @ajay

    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?

    Hey Ajay,

    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!

    Plugin Author Ajay

    @ajay

    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.

    Plugin Author Ajay

    @ajay

    Could you please post a picture of the General Options, similar to this?

    https://www.wordpress.org/plugins/top-10/screenshot-1.png?r=779108

    Hey Ajay,

    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 🙂

    Plugin Author Ajay

    @ajay

    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

    https://codex.wordpress.org/Function_Reference/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:
    http://codex.wordpress.org/Function_Reference/register_post_type

    Any help would be appreciated.

    Thanks for your time!

    Plugin Author Ajay

    @ajay

    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?

    Hey Ajay,

    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).

    Plugin Author Ajay

    @ajay

    By any chance, do you see the columns under Screen Options dropdown at the top?

    http://techtites.com/2013/05/15/wordpress-introduction-to-screen-options/

    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.

    Plugin Author Ajay

    @ajay

    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);

    and

    add_filter('manage_posts_columns', 'tptn_column');

    Hey Ajay,

    I’m kind of lost at this point as well. Perhaps instead of looking at what’s causing it to break, I may just try to add the column in manually in my theme to see how that works.

    Thanks for your time

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Resolved] View Count with Custom Post Types in WP-Admin’ is closed to new replies.
Skip to toolbar