showing topics from separate sites – need formatting help
-
I have been working for about 5 days to get topics from a forum on one site to show on my main page, which is a separate site. I’m running current versions of wordpress multisite, bbpress, and buddypress on my main page.
I found some code via my searches and created a simple plugin. It works to display topics from a separate site on my main page. That was a victory for sure. The problem I am now having is the formatting! Arrghh! I cannot get it to format correctly.
I know that others have been wanting to do this, so perhaps someone else can get me to the final step and we can publish a good plugin. Here is the code:
<?php /* Plugin Name: Recent bbpress Topics Plugin URI: http://whosgotbooks.com/wp-content/plugins Description: A plugin to display recent bbpress topics across the network Version: 1.0.0 Author: Jerry Caldwell Author URI: http://whosgotbooks.com License: Open Source */ function recent_bbpress_topics_shortcode() { recent_bbpress_topics(); } add_shortcode( 'recent-bbpress-topics', 'recent_bbpress_topics_shortcode' ); // ! // Add Recent Topics to BBPress function recent_bbpress_topics() { if ( bbp_has_topics( array( 'author' => 0, 'show_stickies' => false, 'order' => 'DESC', 'post_parent' => 'any', 'posts_per_page' => 8 ) ) ) { //bbp_get_template_part( 'bbpress/loop', 'topics' ); bbp_get_template_part( 'loop', 'topics' ); } // Hook into action add_action('bbp_template_after_forums_loop','recent_bbpress_topics'); } ?>
I have been trying to get this to format with bbpress.css. I managed to changed the css on one of my sites to get things how I want, but I can’t with this function. Here is a link of how I want things to look: http://whosgotbooks.com/book-reviews/
And here is the link of the main page, where I can’t quite get it the way I want it: http://whosgotbooks.com/Here is the bbpress.css that worked on the review page, but doesn’t work for the main page:
li.bbp-topic-title { float: left; text-align: left; overflow: hidden; width: 75%; } #bbpress-forums li.bbp-body ul.topic { /* border-top: 1px solid #7D573A; */ border-top: transparent; overflow: hidden; display: inline-table; padding: 8px; width: 22%; }
To get the books somewhat organized on the main page, I had to change width to 20% on the bbp-topic-title class above, and the bbp-body ul.topic changes do not help on the main page.
This is the extent of my abilities. I would love to get rid of those annoying dots as well. Hopefully someone can help me get the rest of the way.
Thanks…
- You must be logged in to reply to this topic.