WordPress.org

Ready to get started?Download WordPress

Forums

P2
Choose category for posts (7 posts)

  1. francismaile
    Member
    Posted 1 year ago #

    [Theme: P2] Why can't I set a category when I post using this theme? It seems to me the most basic feature for posting on any blog theme. Others have asked this question and gone unanswered. Does Automattic still support this theme? Or have they abandoned it?

    http://wordpress.org/extend/themes/p2/

  2. potentweb
    Member
    Posted 1 year ago #

    It just turned it on on my installation and works just fine for me. Category shows up where it is supposed to be.

  3. francismaile
    Member
    Posted 1 year ago #

    Please see the screenshot.
    https://dl.dropbox.com/u/39206157/p2-theme.png
    I can set the post as:
    Status Update
    Blog Post
    Quote
    Link
    I can upload an image. I can give the post a title and tags, but where do I set the category.

  4. astromono
    Member
    Posted 1 year ago #

    Alright, I had this issue and I've been thinking about it, so I think I discovered how to add the category dropdown list:

    First you need to edit the post-form.php file in you P2 Theme. So go to your editor and in post-form.php add the following at the end of line 74:

    <?php wp_dropdown_categories(); ?>

    Now, if you refresh your site you'll see the dropdown showing up on top of your Post It button in all formats, but you gotta edit it to look better.

    What I did in this case was reduce the width of the input#tags down from 75% to 50% like this:

    #postbox input#tags {width:50%;}

    And that's it. You might need to clear your cache before you see the changes, since this theme relies heavily on ajax.

    If you have categories that don't show in the dropdown, it's probably because the dropdown will not show cats that don't have posts in them. So add a post to the category you want to see and it will show up on the list.

    Note that if you're using a child theme, for some reason the width of the input#tags won't work if you change it in the child theme stylesheet. Yeah, I know editing core CSS files (or any file for that matter) sucks, but I don't know why P2 doesn't play well with child themes.

    Also, you might be interested in knowing that Jonathan Warren made a kickass child theme for P2 that adds responsiveness to the markup, making it work seamlessly with tablets and cel phones :)

    https://github.com/nmec/p2-responsive

  5. astromono
    Member
    Posted 1 year ago #

    Ah, forget about what I said earlier. The code I placed only lists your categories, but doesn't actually assign them to the post.

    I was actually able to do this with the info in these links:

    http://wpguru.co.uk/2012/04/how-to-bring-back-post-categories-in-p2/

    http://wpguru.co.uk/2012/03/how-to-tweak-p2-adding-and-replacing-categories/

    Cheers and good luck!

  6. r_27
    Member
    Posted 1 year ago #

    how to assign these categories to the post?

    I mean in categories, the categories that admin can add them from the dashboard, Not the categories that appear in p2 theme(quote, status update....)

  7. tsheiner
    Member
    Posted 10 months ago #

    astromono;

    Could you be clearer about your recipe for success?

    I tried to follow the instructions in the posts you reference but could not get to the point where from the post form I could display a list of my categories and let one be associated with a post.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags