WordPress.org

Support

Support » Plugins and Hacks » Custom post types

Custom post types

Viewing 14 replies - 1 through 14 (of 14 total)
  • Plugin Author Arnan de Gans
    Participant

    @adegans

    Why would AdRotate do anything at all with custom post types?

    I only want to show ads in my wiki and not on pages and posts. http://wordpress.org/extend/plugins/simple-ads-manager/ allows for this and was wondering whether this functionality was available in Adrotate because I would prefer to use Adrotate.

    That’s why.

    Plugin Author Arnan de Gans
    Participant

    @adegans

    But you ad adverts to posts and pages manually with AdRotate (The one exception being widgets). So you are basically free to put ads wherever you want already.

    That I do, except in my wiki.

    Plugin Author Arnan de Gans
    Participant

    @adegans

    I’m assuming your wiki pages have a custom template inside your theme.
    You should/could add the adverts there. A group for example. So you can manage the group from the dashboard without ever touching that code again.

    Hassan
    Participant

    @hassanhamm

    Arnan, I think support for custom post types and custom taxonomies is needed.. at least I need it.

    Here’s my case study: I run a user-generated classifieds website. Users submit their ads (which are actually custom post types), and I want to select an Ad Group to be inserted at the top/bottom of every single (custom) post OR custom taxonomy archive page. Currently this is not possible.

    We could have an option like: Include this Group in all posts of type [select your custom post type], rather than selecting individual pages to insert into.

    I hope I made myself clear.

    zelimir83
    Member

    @zelimir83

    I absolutely agree, the ability to place banners in custom taxonomies, just like into regular categories from the admin panel is essential. Right now, you can only use standard WP categories, which really limits the potential of this fantastic plugin. If it had this ability, I can see it being used regularly on classified sites, real estate portals, and other more complex web sites. Right now, it really limits the usage to simpler WP sites.

    Plugin Author Arnan de Gans
    Participant

    @adegans

    There is no way to create a similar function as the post injection that groups have.

    Obviously I can not predict which post types to support. And just listing them all as they appear will result in poor output.

    Imagine you have a post type for classifieds and I assume it to have a title so I add the advert under the title. Easy.
    But your classified may use the title for a name of a person which shows at the end of a classified… The whole layout would be wrong and crap.

    This situation happens already on http://www.adrotateplugin.com for the testimonials plugin I use. And another plugin for the slider also uses the fields in a different way. And that’s just my site…

    So no. If you want adverts for custom post types edit the theme and add it there and build a truly custom layout which actually works for your site.
    I can help you with that for a small fee if you need -> http://www.ajdg.net

    Hassan
    Participant

    @hassanhamm

    Just commenting so I can uncheck the “Notify me of follow-up posts via email” option. Not interested in this anymore.

    zelimir83
    Member

    @zelimir83

    Hi,

    thank you for your reply.

    I am not sure why you would use as an example a situation where a name of a custom taxonomy would be the same as a title for a person? You would simply output a list of IDs for all the taxonomies on the site, like many other plugins do, and let the administrator choose on which taxonomies he wants to show a certain ad group.

    I dont see the difference in outputting regular WP categories, and custom taxonomies. If you have multiple post types, would you not be able to sort it hierarchically, and let a user choose one post type, and then display a list of taxonomies from that post type, and so on...Ive seen a lot of plugins do this on a regular basis.

    Now, I am not talking about injecting adverts into posts using the taxonomy list, I am just saying that it would be useful to be able to choose on which taxonomies the advert should appear. I would create different groups, and just hard code the banners in theme files.

    Because, right now, I have a client that has just one custom post type, with 5-6 taxonomies, and 5-6 terms per taxonomy. I can hard code banners into the theme, and create groups that he can use to display banners on current taxonomies, but I cannot enable him to create a new term or a taxonomy, and just check a box to display a banner on his newly created term. Each time he creates a new term, I would have to hard code something, and he would not be able to truly manage the banner system from CMS solely. Would you not agree? Until you do not have something like this in place, I’m afraid this will not be a truly full CMS banner management system suitable for larger sites.

    And one more thing – imagine you want the banner to appear on just two particular taxonomy terms. How would I cross reference this? Should I hard code every combination imaginable, so that the banner displays on, lets say, just the terms “apples” and “oranges”, but not bananas. And if I want it to display on “oranges” and “bananas”, what should I do? Hard code hundreds of php if clauses and try to predict all the ways my client might want to display banners?

    I love your plugin, and please don`t find this a too harsh of a criticism, I am just trying to figure out a solution, maybe I over looked something. Are my questions in place, or am I just rambling?

    Thanks
    Zelimir

    Plugin Author Arnan de Gans
    Participant

    @adegans

    It’s not a matter of finding the taxonomies, also not to add an advert to them. That’s relatively easy.

    In a normal page/post there usually is the following order –
    TITLE
    META DATA
    CONTENT
    COMMENTS

    A custom post type follows the same flow, but often uses those “fields” in a different order. As I pointed out in my example.

    The testimonies plugin i use for example uses –
    CONTENT
    TITLE (name of person)
    No meta data, no comments.

    This clearly can cause some problems with ads showing up in places you do not want them to. For example – For the normal post/page “above the title” means “between content and title” for my testimony plugin. Completely different and probably not what the advertiser wants.

    That’s not to say it can’t be done. It’s just a lot more difficult to make a workable model because every post type can do whatever they want with the order of things and I can’t predict that.

    zelimir83
    Member

    @zelimir83

    I absolutely understand what you are saying, and it makes total sense, but the issue you described is related to advert injection, this cannot be a problem with hard coding banner and group shortcodes into theme files, right? Could you not separate the injection of adverts displaying hard coded banners and groups on taxonomy pages? This way, we would have an option to choose when to activate those banners (only display them in certain taxonomy terms) while keeping full control in where they appear on the web site?

    Hassan
    Participant

    @hassanhamm

    Sorry to chime in here again, but I’m still getting those email notifications for this post, seriously WordPress?!!

    Sigh, unchecking the option… again.

    Plugin Author Arnan de Gans
    Participant

    @adegans

    @hassan, edit your favorite topics in your profile. It’s probably still in there or something

    @zelimir, Not sure what you mean. But indeed. hardcoding in theme files is completely separate from the earlier mentioned methods/problems.
    The automated way which would be problematic is where I use WordPress hooks or simply alter the output using a filter. That has got nothing to do with editing theme files.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘Custom post types’ is closed to new replies.