WordPress.org

Ready to get started?Download WordPress

Forums

Achievements for WordPress
[resolved] Custom post types support& (6 posts)

  1. Russolink
    Member
    Posted 1 year ago #

    Is there any way the outstanding plugin supports custom post types? Like if a user posts not blog post, but a custom post type? It does not seem to work with custom post types...

    http://wordpress.org/extend/plugins/achievements/

  2. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    There are (I believe) explicit checks for Post and Page types, on purpose.
    If you want to add support for a custom post type, you'll need to write that support yourself.

    If you know PHP, and know how to build WordPress plugins, I'll give you some pointers how to add support to Achievements for a custom post type.

  3. Russolink
    Member
    Posted 1 year ago #

    Not that I am a super PHP programmer, but I would say if you give me some hints I am sure I will be able to figure out the rest. Thank you very much!

  4. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 1 year ago #

    Start by looking at /includes/extensions/bbpress.php.
    You'll need to duplicate this class into a custom plugin (to use as a base), and load it like so:

    `
    function russ_init() {
    require 'the_new_class.php';
    }
    add_action( 'dpa_init', 'russ_init' );
    `

    You'll want to rename all the functions etc so they are specific to your purposes. *Assuming* you want to capture regular WordPress do_actions for a specific post type (such as "draft_to_publish", etc), put those actions into the $this->generic_cpt_actions property, and be sure to update the event_name() method to return the appropriate value.

  5. alexfads
    Member
    Posted 1 year ago #

    Im not sure if this is the right place to ask this, but I am currently running a wordpress theme called "flavor" from industrial themes. The theme contains a bunch of minisites that are created using custom post types. It also has woocommerce support and buddypress. I am trying to create a site that members can login on the frontend, create /upload their own content (custom post types), and unlock achievements based on their reviews, views, best post, most viewed, etc. My question is, is it possible for members to do this using custom post types? I think it normally works with normal posts or pages, but Ive heard of sites that have made it work with custom post types..? Also, my goal is to allow members with a free membership gain achievements through posting their own content and competeing with other members, but also allow paid members to gain awards/achievements and even be payed from clicks. do you know if your plugin works well with any affiliate software that could handle this? Any insight is greatly appreciated.

  6. Im not sure if this is the right place to ask this

    It really isn't. Can you please post your own topic? This one is marked resolved and what you are asking has nothing to do with this thread.

    http://wordpress.org/support/forum/plugins-and-hacks#postform

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.