Ask your WordPress questions! Pay money and get answers fast! Comodo Trusted Site Seal
Official PayPal Seal

Inserting html text above bbpress forum pages? WordPress

  • SOLVED

Using Sterling Theme 2.1.2 and Wordpress 3.6

I’ve inserted this code into the bbpress file archive-forum.php and uploaded it into my child theme folder.

The copy is there, but the formatting of the page is not.
Do you know how can I get this html copy to appear on all the bbpress forum pages? And make it look right?

Here’s the code I’m using:

<code>
<?php
//your php code here
?>

<h2>helping our patients connect, share, and survive</h2>
<p>Each woman touched by cancer has a story to tell.</p>
<p>Sharing how you are facing, battling, and overcoming gyn cancer can be an important part of healing. </p>
<p>We invite you to join in the conversation, <a href="http://swgynonc.com/resources-for-women-with-gyn-cancer/caring-for-cancer-blog/">or click here to read survivor stories from our patients.</a></p>
<p>&nbsp;</p>

<?php
//more php code
?>

</body>
</html>
<code>

Answers (1)

2013-08-06

Sabby Sam answers:

Hi,

You need to put a main div class between.
Its acting outside the main div post.
or could you be more specific please




XtraMark comments:

Can you provide the code to put a main div class between?

Does this mean adjusting the archive-forum.php and/or the bbpress-functions.php in addition to the child style sheet?

The full code of the archive-forum.php is here (I don't think I can attach the files)
Thank you for your help!

<code>
<?php

/**
* bbPress - Forum Archive
*
* @package bbPress
* @subpackage Theme
*/

get_header(); ?>

<?php do_action( 'bbp_before_main_content' ); ?>

<?php do_action( 'bbp_template_notices' ); ?>

<?php
//your php code here
?>

<h2>helping our patients connect, share, and survive</h2>
<p>Each woman touched by cancer has a story to tell.</p>
<p>Sharing how you are facing, battling, and overcoming gyn cancer can be an important part of healing.  </p>
<p>We invite you to join in the conversation, <a href="http://swgynonc.com/resources-for-women-with-gyn-cancer/caring-for-cancer-blog/">or click here to read survivor stories from our patients.</a></p>
<p>&nbsp;</p>

<?php
//more php code
?>


</body>
</html>
<div id="forum-front" class="bbp-forum-front">
<h1 class="entry-title"><?php bbp_forum_archive_title(); ?></h1>
<div class="entry-content">

<?php bbp_get_template_part( 'content', 'archive-forum' ); ?>

</div>
</div><!-- #forum-front -->

<?php do_action( 'bbp_after_main_content' ); ?>

<?php get_sidebar(); ?>
<?php get_footer(); ?>
<code>


Sabby Sam comments:

Hi try this code


<?php



/**

* bbPress - Forum Archive

*

* @package bbPress

* @subpackage Theme

*/



get_header(); ?>



<?php do_action( 'bbp_before_main_content' ); ?>



<?php do_action( 'bbp_template_notices' ); ?>



<?php

//your php code here

?>



<h2>helping our patients connect, share, and survive</h2>

<p>Each woman touched by cancer has a story to tell.</p>

<p>Sharing how you are facing, battling, and overcoming gyn cancer can be an important part of healing. </p>

<p>We invite you to join in the conversation, <a href="http://swgynonc.com/resources-for-women-with-gyn-cancer/caring-for-cancer-blog/">or click here to read survivor stories from our patients.</a></p>

<p>&nbsp;</p>



<?php

//more php code

?>







<div id="forum-front" class="bbp-forum-front">

<h1 class="entry-title"><?php bbp_forum_archive_title(); ?></h1>

<div class="entry-content">



<?php bbp_get_template_part( 'content', 'archive-forum' ); ?>



</div>

</div><!-- #forum-front -->



<?php do_action( 'bbp_after_main_content' ); ?>



<?php get_sidebar(); ?>

<?php get_footer(); ?>


XtraMark comments:

This is the exact same code I sent you....
Do you want to try resending revised code please?


Sabby Sam comments:

No I just remove the


</body>

</html>

from your code.


XtraMark comments:

Removing
</body>

</html>

did not change the page layout (please see attached)