• Resolved Joris

    (@jorisdieben)


    I love the improvements in the updated P2 theme (1.1.3), especially the function that you are able to post to different categories.

    Instead of the categories used in the defeault theme (status, post, quote & link), I would like to set my own categories. I tried to change it in the post-form.php without any luck.

    Does anyone know how to do this? Thanks.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Thread Starter Joris

    (@jorisdieben)

    If nobody knows how to do this? Can somebody suggest another place where I can post my question?

    Hey Joris,

    what are you specifically referring to when you say categories?

    Do you want to set categories for posts,
    or do you want to create your own post types (like status, post, quote , link)?

    I’ve done both with the old P2 theme and have yet to implement with the new version, when I do, I’ll share how I did it but that might not be until January. If anybody else cares to give a how-to in the mean-time, that would be great.

    Thread Starter Joris

    (@jorisdieben)

    What I want is to use the tabs for different categories (all categories will use the same post type). The language of the blog will not be in English, so I need to change the category names.

    Let me know when you or anybody else knows how to do this. Thanks!

    I see now that P2 is just using categories instead of post types. A little confusing.

    However, it’s very easy to add a category, I did this:
    in the post-form.php around line 1894 (depends on how you want the categories ordered visually) add your new category.
    (replace mentions of the word Model with the category you want)

    <li><a id="Model"<?php if ( $_GET['p'] == 'model' ) : ?> class="selected"<?php endif; ?> href="<?php echo site_url( '?p=model' ) ?>" title="<?php _e( 'Model', 'p2' ) ?>"><?php _e( 'Model', 'p2' ) ?></a></li>

    Then in ajax.php
    on line 155, add your category to the list of accepted categories.

    $accepted_post_cats = apply_filters( 'p2_accepted_post_cats', array( 'post', 'quote', 'status', 'link', 'Model' ) );

    (using P2 version 1.1.3)

    Thread Starter Joris

    (@jorisdieben)

    Nobble you made my day!

    I was looking for a line, like the one in ajax.php, but somehow I missed it.

    Thanks you very much, this topic is now resolved.

    Very nice post …

    But Nobble, the default 4 categories have a small picture next to them.
    How do i make a new default pic for my custom category ?

    that a css matter, use the ID you′ve given your category (<a id=”yourcategoery” etc..) and do something like:

    #post-types #YOURCATEGORY {
    background:transparent url(i/youricon.png) no-repeat scroll 4px center;
    padding-left:24px;
    }

    you can see how the other categories have been styled in style.css using firebug.

    Thanks there Nobble … Resolved.
    Firebug made things a lot easier. ?? Thanks for the directions

    I am trying to do the same but with the Quote box for . I have gotten to the point, mostly using the method above, where I have the box all set, the quote entry look all set, and the category setting all set, BUT I cannot get the thing to post in quote format.

    Can anyone help me basically replicate the quote functionality, with the ability to give them different names. I’m running into an issue with the ID tag. If it is not set to “quote” it will not publish in quote formatting. I have tried to replicate some code and fiddle around with it but to no avail.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Change category tabs above the P2 post box’ is closed to new replies.