Search Results for 'code'
-
Search Results
-
Hello,
I want to include WP template tags in bbPress templates and vice versa.
For example in user-profile.php in my bbPress template, I want to include <?php echo get_the_author_posts(); ?> (http://codex.wordpress.org/Function_Reference/get_the_author_posts), which is a WP template tag.
Similarly, for author.php in my WordPress template, I want to include topics started by the author.
I imagine I’d have to query the user, so is there a way of doing this?
Is it possible to remove the parenthetical topic and reply number from the index as it appears when one uses the bbp-forum-index shortcode? If so, what do I do?
Many thanks
I’m trying to edit
"user" started the topic "Topic" in the forum "Forum"in the activity header of my buddypress activity page. I looked forever to try and find it in wp-content/pluggins/buddypress/bp-languages/buddypress.POT and couldn’t find this:%1$s started the topic %2$s in the forum %3$sI eventually found it in
wp-content/plugins/bbpress/languages/bbpress.POT I then did this:1. edit the file bbpress.pot file in poedit.
2. create the folder “bbpress” in the wordpress content languages folder. Make the languages folder if you need to so your path looks like this: wp-content/languages/bbpress
3. save the edited bbpress.pot file as bbpress-en_US.po
4. upload the created po and mo files to the bbpress folder in lanugaes. reset your cashe to see it workingI found that in this thread: http://bbpress.org/forums/topic/language-file-isnt-working/
I also tried
define ('WPLANG', 'en_US');Nothing. Am I doing this right?
Please help, I’ve been stuck for weeks on this.
Topic: Pagination Problem
Hello,
I’m developing theme for my site where I made it look pretty much like this one here.
So how I did it:
First of all in bbpress.php (in the root)
<?php if (is_post_type_archive( 'forum' )) { ?> <div class="entry-content row"> <div class="forum-sidebar span3"> <h3 style="float:left;margin-bottom:11px">Forums:</h3> <?php bbp_get_template_part( 'bbpress/content', 'archive-forum-home' ); ?> </div> <div class="span7"> <h3 style="float:left">Recent Topics:</h3> <div class="bbp-new-topic-form" style="float:right"> <button id="bbp_forums_new_topic" class="btn"><i class="icon-edit"></i> New Topic</button> </div> <?php bbp_get_template_part( 'bbpress/content', 'archive-topic-home' ); ?> </div> </div> <?php } else { ?>so in my achive-topic-home I use this template:
<?php if ( bbp_has_topics() ) : ?> <?php bbp_get_template_part( 'loop', 'topics' ); ?> <?php bbp_get_template_part( 'pagination', 'topics' ); ?> <?php else : ?> <?php bbp_get_template_part( 'feedback', 'no-topics' ); ?> <?php endif; ?> <?php do_action( 'bbp_template_after_topics_index' ); ?>I didn’t touch much of the template files.
The problem is pagination.
For example second page in pagination links to http://example.com/page/2
where my forums are located at http://example.com/boards
where I try to navigate to http://example.com/boards/page/2 it gives me an 404.——
Also interesting what I found:
first archive-forum-home template:<div id="bbpress-forums" class="forum-news"> <?php do_action( 'bbp_template_before_forums_index' ); ?> <?php if ( bbp_has_forums() ) : ?> <?php bbp_get_template_part( 'loop', 'forums-home' ); ?> <?php else : ?> <?php bbp_get_template_part( 'feedback', 'no-forums' ); ?> <?php endif; ?> <?php do_action( 'bbp_template_after_forums_index' ); ?> </div>so when I delete everything inside, now pagination points to
http://example.com/boards/forum/SOMEFORUMNAME/page/2/I don’t get how it chose this SOMEFORUMNAME..
Maybe you guys here have an idea what going on
If you need any more information I can provide, please askThanks
I wanted to enable a WP shortcode I have written within bbpress, it seems the common way to do this is to use do_shortcodes($content) on the post, this works fine and I’ve seen it in a number of published plugins.
The problem with this is that it enables all shortcodes including the bbpress ones such as login, stats etc. In fact a number of published plugins suffer from this issue (oops).
The best solution I’ve come across is using the whitelist plugin:
http://wordpress.org/plugins/bbpress2-shortcode-whitelist/But I was wondering if anyone had any other ideas?
Could a new bbpress action for registering shortcodes be added? Then any plugin author just has to register their own new one and not have to worry.
My other idea is to do a find/replace on “[” before my do_shortcodes call, switch them to something else, and then switch them back after, but leaving my own shortcodes unchanged.Anyone else had this prob? Anyone using a plugin that hasn’t taken this into consideration?! (try adding a bbpress shortcode to a post and seeing what happens!)
Hi Everyone!
For my main forum homepage or the archive i want to display different forums into sections rather than having a list of forums that is the bbpress default.
So this is the code used to display all the forums,
<?php while ( bbp_forums() ) : bbp_the_forum(); ?> <?php bbp_get_template_part( 'loop', 'single-forum' ); ?> <?php endwhile; ?>So how would i add some arguments to this to display certain forums from there ID’s?
Also on the main page i want to show 5 recent topics, i believe the loop code is this,
<?php while ( bbp_topics() ) : bbp_the_topic(); ?> <?php bbp_get_template_part( 'loop', 'single-topic' ); ?> <?php endwhile; ?>If anyone has managed to use a custom loop using the above code to display 5 recent topics or a custom WP_Query, i’ll be very grateful if you could show some example code.
Kind Regards
~ MattOn this page http://codex.bbpress.org/shortcodes/ they say “To use any of the shortcodes simply insert the desired shortcode into any WordPress page.”
So far I’ve tried these three
[bbp-forum-index] [bbp-single-forum id=1] [bbp-topic-index]nothing happens except they show up as text. Why?
Howdy everyone,
I want to migrate an old bbPress forum 1 to bbPress 2.3.2. I used the importer tool to import the old topics an so on. But I am missing the attachments and the user-avatars. The attachments shortcode is shown, but not the image and no avatar. Can anyone help me please?
Wordpress 3.5.1 and bbPress 2.3.2
Kind regards,
iGorasHey guys
i am using one bbp theme and it uses “search-topics.php” file for searching among topics but unfortunately is shows private message as results as well.
any idea of how i can achieve this by changing the code ?thanks for your help
Hello,
I am having an issue with the forum. The original posts are fine, but any replies made to the OP and the avatar is small, and misaligned along with the username not being formatted correctly either.
See for yourself here: http://www.amazing-auroras.eu/forums/topic/moved-reply-to-hi/
I use WP User Avatar, but I de-activated it, deleted it, de-activated BBP, all made zero difference, so I am not sure it is related, especially as the original post in forums displays everything correctly, it is only replies that have the issue.
I have searched through this support forum for days without finding a fix.
I have also gone through most code that I think might affect it but have not found anything.
I cannot find the code that says the avatar should be smaller in replies, is this normal for BBP or is my theme making this happen?
So any ideas even if you can tell me if it is a theme issue, BBP issue, or whatever. I am totally at a loss where to look now.