Skip to:
Content
Pages
Categories
Search
Top
Bottom

Incorrect page.php coding

  • @hallsy

    Participant

    Hey guys can someone put me in the right direction please. I am using the latest instalments of WP and BP.

    I am having the same problem as a few other people when it comes to the “create Group’ button not showing up on my theme and i believe its all down to my theme and not BP itself. I have asked my theme guy for some support but i dont think he understands what im asking.

    Here is the ticket issue which was raised 2 months ago:

    http://buddypress.trac.wordpress.org/ticket/4834

    And here is my page.php code:

    http://pastebin.com/g3aiUnWZ

    I have tried adding the tickets solution into my page.php but maybe i am not putting it in the right place? As i am getting a blank white page….

    Any ideas on where i should be placing boones coding?

    I know this isnt necessarily a BP problem but a theme one, any help would be appreciated!

    Thanks all.

Viewing 8 replies - 1 through 8 (of 8 total)
  • @karmatosed

    Moderator

    As Boone says in that ticket try replacing this line:

    <?php while ( have_posts() ) : the_post(); ?>

    With

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    @hallsy

    Participant

    Hey @karmatosed thanks for the reply. I have tried that but i seem to be getting a blank website from that. Just a white page, somethings not being liked 🙁

    @hnla

    Participant

    Checking that pastebin link to see what you’ve done does show the while loop in place and it
    looks like it ought to be ok so there may be issues elsewhere.

    Just for safety copy the page.php file and rename it buddypress.php, revert your page.php to as it was. BP will use buddypress.php if it finds it. In buddypress.php replace the get_template_part call for content-page with the actual content in that file so your buddypress.php contains all the code it needs in one place and repost it to pastebin – this is chiefly so people can see all the code.

    @hallsy

    Participant

    wow @hnla thanks i may take some time with this as its getting a little complicated for my current skill level.

    @hallsy

    Participant

    right i have copied the page.php and renamed it buddypress.php but i dont understand what you mean by:

    get_template_part call for content-page with the actual content in that file

    I can see that part but i dont know what to add

    <?php get_template_part( 'content', 'page' ); ?>

    @hnla

    Participant

    (‘content’, ‘page’) refers to a file content-page.php the contents of that file replace the template call so was simply suggesting you open that file and copy contents directly to it’s parent minus any undue comments at top of file, then we are only having t study one file & can see all the code.

    @hallsy

    Participant

    ok here is a pastebin to my page.php code which is the same as my newly copied buddypress.php

    From line 33 it is my content-page.php code

    I hope this is what you mean @hnla if it isn’t i apologise as i am very much a total beginner..

    http://pastebin.com/a7d93eQA

    @hnla

    Participant

    Not quite correct the page-content contents ended up outside the loop, I’ve revised that but it’s hard to edit clearly.

    http://pastebin.com/xryyq1te

    I see no obvious issues so not really sure what’s not working correctly.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Incorrect page.php coding’ is closed to new replies.
Skip to toolbar