BuddyDev

Search

[Resolved] BuddyPress content not showing when using MediaPress

Tagged: ,

  • Participant
    Level: Initiated
    Posts: 10
    Richard Wells on #1799

    Brajesh

    I really appreciate your persistent help with this. Fresh eyes in the morning might help me at least!

    Richard

  • Participant
    Level: Initiated
    Posts: 10
    Richard Wells on #1801

    Brajesh

    I may be being naive, but I think I have found a solution. The canvas/content-page.php file is including BuddyPress as the excerpt because the test is_singular() fails.

    <section class=”entry”>
    <?php
    if ( ! is_singular() ) {
    the_excerpt();
    } else {
    the_content( __( ‘Continue Reading →’, ‘woothemes’ ) );
    }
    wp_link_pages( $page_link_args );
    ?>
    </section><!– /.entry –>

    If I bypass that and get the content, it works. So I guess an override to content-page.php in my child theme with a simple test to check for mediapress content would do it? I am not sure what…

    • This reply was modified 8 years, 5 months ago by Richard Wells. Reason: typo
  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #1803

    Thank you Richard.
    You are right about the cause. I am glad you found it. BuddyPress dynamically replaces actual content with the generated content( and in this case WordPress was regenerating excerpt based on that generated content). the_content() is the right function.

    use bp_is_user() for conditional testing since it will fix problem with other plugins too.

    Hope that helps.

  • Participant
    Level: Initiated
    Posts: 10
    Richard Wells on #1804

    OK, for any other WooThemes Canvas theme users out there, I copied themes/canvas/content-page.php into the root of my child theme and changed the line

    if ( ! is_singular() ) {

    to

    if ( ! bp_is_user() && ! is_singular() ) {

    and that seems to make MediaPress pages show properly.

    Thanks again for your help Brajesh.

  • Keymaster
    (BuddyDev Team)
    Posts: 24211
    Brajesh Singh on #1813

    Thank you Richard.
    It will be helpful for not only MediaPress but other plugins too that adds nested pages on user pages.
    Thank you for posting it here, It will certainly help others too.

    Regards
    Brajesh

The topic ‘ [Resolved] BuddyPress content not showing when using MediaPress’ is closed to new replies.

This topic is: resolved