BuddyBoss Home – Web Support Forums Themes BuddyBoss theme Template for custom posts

Viewing 4 posts - 1 through 4 (of 4 total)
  • Question

    #33679
    @milena

    Hi,

    I am using a plugin for member’s projects. It uses custom posts, and needs to edit the single.php to display.

    Here is what the author wrote to me:

    You should add single-image.php, in order not to mess with your single.php template.

    So, duplicate your single.php, rename it to single-image.php and then add the code I provided.

    I did that- and put this file in both my child theme (he said put it in your active theme) and the main theme, since the child theme didn’t help. The custom posts are not reading it.

    Is there something in the buddyboss theme that prevents adding new templates to posts/custom posts?

    Answers

    #33688

    Alyssa
    Participant
    @alyssa-buddyboss

    @milena I am not aware of anything in BuddyBoss that would prevent a custom post type.

    #33695
    @milena

    All the posts are asigned the single.php template. As I said I made another template and its not working automatically , although should.

    #33706

    Alyssa
    Participant
    @alyssa-buddyboss

    @milena I think the issue stems from the way we request content. In our single.php file you will find code about line 17:
    get_template_part( 'content', get_post_format() );
    This is what grabs the content for the page.
    So instead of copying single.php
    copy content.php and rename it to content-image.php where “image” is the name of the new post type, if the post type is something else then you need to change it to that.

Viewing 4 posts - 1 through 4 (of 4 total)
  • The question ‘Template for custom posts’ is closed to new replies.