Support » Plugin: Pods - Custom Content Types and Fields » Pods with tables, system with average rating and related fields?

  • Resolved sohlweber


    I’m building a portal in which users can review cultural places services.
    Eg.: User A rates Audio guide of National museum.

    I was able to do it with normal custom post types using pods but when trying to get average Ratings for single services things get messy.

    Where I answered myself (Update 1) and there you can find the code I developed to find average ratings and sort results by them.

    Anyways, now I found out that Advanced custom post type exists and that I can do everything with tables thus being able to get average Ratings and sort results will be much faster and easy.

    Now, should I change the already existent CPT (cultural_places, reviews) to ACPT (fields created for both and there’s already some test content)?
    If yes how?
    Or create new ACPT altogether?
    How do I go on making them related (so that when sending a review through cultural_places page it gets it’s ID as related field)?
    And the custom categories for cultural places?

    And some SQL questions:
    For generating average ratings and sorting cultural places by them should I create a view in the database that combines both ACPTs and computes the average ratings as a dynamic column?
    Or everything can be done by using a select in the template page?

    Thanks a lot and sorry for the wall of text!
    Much love,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Jim True


    For these kinds of questions: Is this possible with Pods? Can I do this with Pods? Please read this FAQ:

    Hi Jim!
    Thanks a lot!
    I guess that you read all of my topic but: I also want some opinions about all of those questions, if possible. Eg.: I’ve searched a lot and I can’t find proper answers or a tutorial that explains the know-how.
    So, it would be awesome and really appreciated if you, or anyone, could be so kind as to enlighten me. Or point me in the right direction, maybe there are tutorials that I couldn’t find.

    Plugin Author Jim True


    No tutorials for that sort of thing, sorry. You shouldn’t use Advanced Content Types unless you are very knowledgeable of dealing with databases, SQL, PHP, etc.

    You should stick to Custom Post Types and things that are more supported within the WordPress world of plugins. That’s what we recommend in the Grow, Plan and Build videos that are linked in that FAQ.

    Pods Framework really REALLY doesn’t have the time to advise on ‘is this structure going to work for me or can you help me build it?’ types of questions. All of our support is Community Volunteer based. That means, we learned just like you’re going to have to by making mistakes and learning from those mistakes.

    Hmm, ok, sure.
    I didn’t know. But thanks anyways.
    Just one thing, I already decided to create all new ACPT and be done with it. I see the tables in phpmyadmin. I can also see the related fields table.
    But I still can’t understand how to make a custom taxonomy for the ACPT. In the normal custom taxonomies it’s only showing the normal CPT to choose.
    Thanks again

    Plugin Author Jim True


    Custom Taxonomy is a WordPress specific thing. It only exists in WordPress. You can’t create a Custom Taxonomy for an Advanced Content Type, you can only create relationships to a Taxonomy from an Advanced Content Type.

    Again, anything dealing with Advanced Content Types is OUTSIDE of the WordPress infrastructure. Anything you’d like to do that acts like WordPress, isn’t going to work without coding a lot of stuff using the Pods API, because all of the default WordPress API functions will not work with Advanced Content Types.

    We can’t help you write custom solutions like this, because it’s assumed, honestly, if you’re going down this route, you know your PHP, SQL, etc.

    We have Table Storage under Custom Post Types, which only moves your custom fields into separate tables and that works within WordPress, but if you’re planning on building any solution that requires filtering, working with themes and working with the massive infrastructure of WordPress plugins, you should be working in Custom Post Types, Custom Fields and Custom Taxonomy as supported by WP Core.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.