Search Results for 'test'
-
Search Results
-
In the main forum i have the configuration for see the latest post. I can change the configuration for show the latest comments?
Topic: Text Justify
I am using the latest version of WP and bbPress. While writing in a topic how can you add colors to text and align the text? I did not see them while editing.
Thank you.I spent so long trawling google for an answer to this question, so i am sharing what i came up with. It might not be beautiful code (i patched it together from a number of sources), but it works for me.
Basically, i have a list of forums on my forum home page. I just wanted to show the latest post within each forum as a teaser below the forum description – not just the title, but the excerpt, too. I can’t believe there’s nothing out there explaining how to do this. It seems like a pretty obvious format for the forum index.
The following snippet will output the latest reply, with post title and post link below the forum description. If there are no replies, it will output the latest topic instead.
function jag_add_last_reply() { { $jag_last_reply_id = bbp_get_forum_last_reply_id(); $jag_last_topic_id = bbp_get_forum_last_topic_id(); $new_args = array( 'post_type'=> 'reply', 'p' => $jag_last_reply_id ); $other_args = array( 'post_type'=> 'topic', 'p' => $jag_last_topic_id ); $nest_query = new WP_Query( $new_args ); $another_nest_query = new WP_Query( $other_args ); if ( $nest_query->have_posts() ) : while ( $nest_query->have_posts() ) : $nest_query->the_post(); $this_post_id=$post->ID; $this_post_title= get_the_title(); $this_post_content= get_the_excerpt(); $this_post_permalink= get_permalink(); ?> <a href="<?php echo $this_post_permalink; ?>"><h1><?php echo $this_post_title; ?></h1></a> <div class="the_content"><?php echo $this_post_content; ?></div> <?php endwhile; elseif ( $another_nest_query->have_posts() ) : while ( $another_nest_query->have_posts() ) : $another_nest_query->the_post(); $this_post_id=$post->ID; $this_post_title= get_the_title(); $this_post_content= get_the_content(); $this_post_permalink= get_permalink(); ?> <a href="<?php echo $this_post_permalink; ?>"><h1><?php echo $this_post_title; ?></h1></a> <div class="the_content"><?php echo $this_post_content; ?></div> <?php endwhile; endif; }} // Hook into action add_action('bbp_theme_after_forum_description','jag_add_last_reply');
Just put this in your theme’s functions.php and it should do the trick. Haven’t figured out how to spit out multiple posts and replies for each forum yet, but this is all i needed. Good luck.
Topic: 404 Error Within Forums
Hi,
I recently installed bbpress onto a newly created wordpress website, I’ve read through loads of different forums on 404 errors but can’t seem to solve this:
When I click on any forum I have created the next page is a 404 page not found error.
Any suggestions would be greatly appreciated.
The error can be seen here:
just click on the test forum
Thanks