Support » Theme: P2 » [Theme: P2] Choose category for posts

Viewing 6 replies - 1 through 6 (of 6 total)
  • It just turned it on on my installation and works just fine for me. Category shows up where it is supposed to be.

    Please see the screenshot.
    I can set the post as:
    Status Update
    Blog Post
    I can upload an image. I can give the post a title and tags, but where do I set the category.

    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 🙂

    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:

    Cheers and good luck!

    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….)


    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.


Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘[Theme: P2] Choose category for posts’ is closed to new replies.