Viewing 9 replies - 1 through 9 (of 9 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    What are you trying to do?

    Thread Starter X-Raym

    (@x-raym)

    Hi Michael !

    Here is an example webpage for a badge on my website (it is actually just a Test badge, not a real one ^^)

    As you can see, there is Date, Author, and Icon Category (even if the badge is in no category) displayed.

    I just wanted to hide them.

    Sure, I could use CSS, but I wanted to know if there is more clever way to do that 🙂

    Thread Starter X-Raym

    (@x-raym)

    also try to have the list User + Avatar of the badge Earner 🙂
    and a basic “Number of Page Owner = X”

    🙂

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Unless you’re using one of the shortcodes to display this somewhere, then I wager it’s just utilizing your theme’s archive.php file. Registered achievements are technically post types, so when it comes to template hierarchy, they’ll tend to go right for archive.php if nothing more specific is available.

    http://codex.wordpress.org/Template_Hierarchy

    So specifying a template file specifically for the achievement type, would allow you to safely customize to fit your needs at the theme level.

    Thread Starter X-Raym

    (@x-raym)

    OK 🙂
    So I would have to add an something as “if indivual achievemnt page”, I will probably find the real function name in the API.

    And do you think it is possible to display informations about users which also earn the badge ? (Avatar, Display Name, date)

    Once again, I share with you my question because I think the answer can help other people.

    Thanks you again for your support !

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Just a matter of finding out how to query which users have earned the current achievement, and using that info to query all of the necessary user information you want to display.

    Thread Starter X-Raym

    (@x-raym)

    That why I’m trying to figure out, I’m sure there is something good to do with badgeos_get_achievement_earners.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Looks like that’d do it. Just need to pass in the achievement ID, which will just be the post ID for your loop and whatnot, and it’ll return an array of user objects, including user IDs. You could then loop that returned user array and fetch user information as needed. All that’s left is your imagination and a bit of coding/markup.

    Thread Starter X-Raym

    (@x-raym)

    I just succeed to customize my Custom Post Template !

    it was pretty easy : Custom Post Type template are like this :
    single-customPostTypeName.php
    same things for archive.php (an archive-customPostTypeName.php can be created)

    my single-customPostTypeName.php called a content.php type of file I had to modify but it is now 🙂

    I will surely open an other ticket for the badgeos_get_achievement_earners project,
    it is in fact not directly to that particulary problem (whuch was just how to customize the templates), and which is harder that I exepected =/

    This one can be marked as resolved !
    thanks for your help 🙂

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Custom Post Type – Customization’ is closed to new replies.