Support » Theme: P2 » P2 would be better with categories available in the frontend

  • Hello,

    When adding a post on the frontend, using P2 (or Responsive P2 child), it’s only possible to add tags but not possible to select a category for the posts. How would it be possible to make it available without the need to go into the administration board to do so?

    Best regards,

Viewing 1 replies (of 1 total)
  • Hi Mélodie,

    I found the following tutorial that offers step-by-step guidance for adding categories to the front end of P2:

    How to add drop down categories to Automattic’s P2 Theme

    The first step to making big changes such as the above is generally to create a child theme.

    However, things are a little trickier in your case as you’re already using a child theme of P2, Responsive P2.

    As Responsive P2 hasn’t been updated in a couple of years and isn’t in the main repository, I recommend editing it to make the changes you want but keeping in mind that you will not be able to install any future updates released by the child theme’s author. The reason for this is that any direct edits you make to the child theme will be lost after installing an update.

    If you make changes via your child theme instead of the main P2 theme, you’ll still be able to update the main P2 theme without losing any edits. This is important as updates may include security or bug fixes.

    (In case you’d like a little more background to how child themes work, my colleague gives a good introduction and overview in this video.)

    To follow the guidance in the tutorial I linked to, you will need to copy/paste the following files from P2 to your child theme’s directory:

    • post-form.php
    • inc/ajax.php
    • js/p2.js

    You can then edit them directly from your child theme.

    Let me know how you get on with that or if you have any questions.

Viewing 1 replies (of 1 total)
  • The topic ‘P2 would be better with categories available in the frontend’ is closed to new replies.