Search Results for 'code'
-
AuthorSearch Results
-
August 2, 2014 at 9:45 am #150090
Topic: BBP Results Showing in WordPress search
in forum TroubleshootingNitac
ParticipantMy site is running mainly CPTs but I filter my search results to a subset of these using this technique:
function filter_search($query) { if ($query->is_search) { $query->set('post_type', array('A','B', 'C')); }; return $query; }; add_filter('pre_get_posts', 'filter_search');which works fine for wordpress but when I search within BBP i get the ‘Oh bother! No search results were found here!’ message as you’d expect because of the above filter.
If i remove the filter the BBP search works fine, and if I add ‘forum’, ‘topic’, ‘reply’ to the above filter BBP search works fine, but the problem is get I the forum results appearing in the main search results page.
Also, If i remove the filter all together I still get forum results appearing in the main results page.
Is there a way to exclude forums results from appearing in the main search?
August 2, 2014 at 6:58 am #150088In reply to: Random Topic Link
Robkk
Moderator@joejozwowski @robin-w i think stephen already cracked this
i was browsing on how to make custom views and yeah stumbled upon this.
there is a random topic view in his code.
August 2, 2014 at 4:21 am #150083In reply to: Importing for SMF 1.x
Stephen Edgar
KeymasterMost likely you are either not using or an incorrect table prefix.
Open your SMF
Settings.phpwith a text editor, the file should be in the root folder of your SMF install.It should have something like this:
########## Database Info ########## $db_type = 'mysql'; $db_server = 'localhost'; $db_name = 'ntwb_smf'; $db_user = 'mydatabaseusername'; $db_passwd = 'mydatabasepassword'; $ssi_db_user = ''; $ssi_db_passwd = ''; $db_prefix = 'smf_'; $db_persist = 0; $db_error_send = 1;Use the database prefix shown there in the import settings screen, in my case it is
smf_August 2, 2014 at 12:32 am #150075In reply to: Topics and replies randomly going to 'pending' queue
Stephen Edgar
KeymasterMake sure your users are triggering any ‘bad words’ in WordPress comment moderation.
August 2, 2014 at 12:11 am #150073In reply to: how to change install address?
Stephen Edgar
KeymasterIf you only want to have a forum on that site install WordPress and bbPress in the domain forums.example.com. If you want to have separate blog and forum you should look at WordPress Multisite using sub domains, your forums would be the 2nd site at forums.example.com and your WordPress blog would be at eaxample.com.
A good starting point is https://codex.wordpress.org/Create_A_Network
August 1, 2014 at 11:48 pm #150069In reply to: "Details" Won't Open in Topics – Replies
Stephen Edgar
KeymasterI am not sure what you mean, bbPress does not include any links titles
detailsCould you explain it in more detail please, maybe some screenshots if that will help and/or a link to your forums.
August 1, 2014 at 11:43 pm #150068In reply to: Topic ID instead of slugs?
Stephen Edgar
KeymasterThis is neat, thanks for sharing your code @korobochkin
August 1, 2014 at 11:42 pm #150067In reply to: Trouble getting started
Stephen Edgar
KeymasterThis is a theme issue, you should make a copy of your
page.phpfile and rename itbbpress.phpin your themes folder.August 1, 2014 at 11:02 pm #150065In reply to: Favorites and subscription count
Stephen Edgar
KeymasterNice, thanks for the follow up and code đ
August 1, 2014 at 11:00 pm #150064In reply to: Content not showing on using custom template
Stephen Edgar
KeymasterYou copy the files to
/mytheme/bbpressas stated in the links above.You also should change your template as I suggested above, that is the primary cause of your issue I think.
August 1, 2014 at 10:04 pm #150063In reply to: Install Language
Stephen Edgar
KeymasterSee the following https://codex.bbpress.org/bbpress-in-your-language/
August 1, 2014 at 9:06 pm #150061Stephen Edgar
KeymasterShould the admin get an email when a post goes into moderation if I have E-mail me whenever A comment is held for moderation selected in the Settings > Discussion.
I have no idea đ
bbPress is not currently doing this, nor have I got to the this bit in the recent code updates I have written. This is probably something we would want to iterate on further once the changes we have been making as linked above in #2589 and ‘Per forum moderation’ in #459 and how we handle notifications for not just keymasters but also specific forum moderators also.
August 1, 2014 at 8:48 pm #150057In reply to: Mobile display
Robkk
Moderatorare you using a child theme ?? with bbpress.css in your child theme??
cause what i might think is that you have put bbpress.css into your child theme a long time ago
but the bbpress plugin updated their css with a repsonsive layout and you just dont have that code in your child themes bbpress.css
if im right , you can just check out the bbpress plugin and copy styles to your child themes bbpress.css
August 1, 2014 at 8:39 pm #150056In reply to: Finding .css style file
Robkk
Moderator@tonydes child theme
you put it either one i guess,
i copy most of my code into my custom css editor in my theme because it works automatically for me
but if i have to put the code into my bbpress.css in my child theme , i have to add !important alot
August 1, 2014 at 5:02 pm #150055In reply to: Best bbpress polls plugin
palmdoc
Participant@peterwsterling the Polls plugin generally works well. There is however a “bug”
After creating the poll, if one ever tries to edit the first post in the topic, one will see an error message which says that the poll can only be created for the first post (even if it is the first post).
You’ll lose the shortcode formatting and have to re-create it.August 1, 2014 at 1:17 pm #150049In reply to: Full Width Forum Help
Robin W
Moderatorok, so what happens at the moment is that the bbpress.php calls the footer.php at the bottom of it.
The footer in turn calls the sidebar (this is an annoying habit that theme developers have started doing, sidebars should be called in theme pages not in footers aggghhh!).
so what we’ll do in bbpress.php is simply take out the call to the footer, and put the footer code minus the sidebar into the bbpress.php
so in bbpress.php remove the line which says
<?php get_footer(); // Loads the footer.php template. ?>Then put this code in it’s place
</div><!â .content-wrap â> <?php do_atomic( âclose_mainâ ); // oxygen_close_main ?> </div><!â #main â> <?php do_atomic( âafter_mainâ ); // oxygen_after_main ?> <?php do_atomic( âbefore_footerâ ); // oxygen_before_footer ?> <div id=âfooterâ> <?php do_atomic( âopen_footerâ ); // oxygen_open_footer ?> <div id=âfooter-contentâ class=âfooter-contentâ> <?php echo apply_atomic_shortcode( âfooter_contentâ, hybrid_get_setting( âfooter_insertâ ) ); ?> </div> <?php get_template_part( âmenuâ, âsubsidiaryâ ); // Loads the menu-subsidiary.php template. ?> <?php do_atomic( âfooterâ ); // oxygen_footer ?> <?php do_atomic( âclose_footerâ ); // oxygen_close_footer ?> </div><!â #footer â> <?php do_atomic( âafter_footerâ ); // oxygen_after_footer ?> </div><!â .wrap â> </div><!â #container â> <?php do_atomic( âclose_bodyâ ); // oxygen_close_body ?> <?php wp_footer(); // wp_footer ?> </body> </html>Come back with what that does !
August 1, 2014 at 1:09 pm #150048In reply to: Random Topic Link
Robin W
ModeratorAbsolutely you can, once in the edit screen of the page, switch to ‘text’ from ‘visual’ (top right of the content box), and paste
echo '<a href="/?random=1">Random Post</a>' ;in there
August 1, 2014 at 11:37 am #150047In reply to: Random Topic Link
joejozwowski
Participantcould I put that in a page or post, rather than the code?
August 1, 2014 at 10:12 am #150045In reply to: Full Width Forum Help
aussiestar14
ParticipantHope this helps :-/
the footer.php:<?php
/**
* Footer Template
*
* The footer template is generally used on every page of your site. Nearly all other
* templates call it somewhere near the bottom of the file. It is used mostly as a closing
* wrapper, which is opened with the header.php file. It also executes key functions needed
* by the theme, child themes, and plugins.
*
* @package Oxygen
* @subpackage Template
*/
?><?php get_sidebar( ‘secondary’ ); // Loads the sidebar-secondary.php template. ?>
</div><!– .content-wrap –>
<?php do_atomic( ‘close_main’ ); // oxygen_close_main ?>
</div><!– #main –>
<?php do_atomic( ‘after_main’ ); // oxygen_after_main ?>
<?php get_sidebar( ‘subsidiary’ ); // Loads the sidebar-subsidiary.php template. ?>
<?php do_atomic( ‘before_footer’ ); // oxygen_before_footer ?>
<div id=”footer”>
<?php do_atomic( ‘open_footer’ ); // oxygen_open_footer ?>
<div id=”footer-content” class=”footer-content”>
<?php echo apply_atomic_shortcode( ‘footer_content’, hybrid_get_setting( ‘footer_insert’ ) ); ?>
</div>
<?php get_template_part( ‘menu’, ‘subsidiary’ ); // Loads the menu-subsidiary.php template. ?>
<?php do_atomic( ‘footer’ ); // oxygen_footer ?>
<?php do_atomic( ‘close_footer’ ); // oxygen_close_footer ?>
</div><!– #footer –>
<?php do_atomic( ‘after_footer’ ); // oxygen_after_footer ?>
</div><!– .wrap –>
</div><!– #container –>
<?php do_atomic( ‘close_body’ ); // oxygen_close_body ?>
<?php wp_footer(); // wp_footer ?>
</body>
</html>August 1, 2014 at 10:06 am #150044In reply to: Finding .css style file
tonydes
ParticipantThanks for the reply @robkk. Quick question though, if I use a child theme do I create a folder and copy the css file there or to the parent theme? Also once I copy it, do I add relevant code to the file itself or to the custom css editor on wordpress?
Thanks again!
August 1, 2014 at 9:06 am #150043In reply to: Finding .css style file
Robkk
Moderatorheres is a straight link to where you need to be, but reading the whole page isnt bad too
August 1, 2014 at 7:58 am #150041In reply to: Trouble getting started
Robin W
Moderatorok, could be a number of issues
start with theme and plugin as it could be a theme or plugin issue
Plugins
Deactivate all but bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.
Themes
If plugins don’t pinpoint the problem, as a test switch to a default theme such as twentytwelve, and see if this fixes.
Then look at the documentation to see what else you might need to do
August 1, 2014 at 6:56 am #150039Topic: Finding .css style file
in forum Troubleshootingtonydes
ParticipantHi guys,
I apologize in advance, my skills are pretty minimal and I couldn’t find a solution to my problem. I just installed the forum on my site, but the pictures (avatars) for ‘last updated by’, started by’ are huge! Where do I find the.css file to edit them, and what code do I use?
Thanks in advance for the help!
August 1, 2014 at 4:08 am #150034In reply to: login and registration
Robin W
Moderatoryes you need to set up pages for these functions.
So set up a page called ‘registration’ and put
[bbp-register]in it.
and a page called ‘lost password’
and put
[bbp-lost-pass]in it
You can prefix these codes with some text as well so for instance lost password might say
Enter your email address, and we'll send you a new password [bbp-lost-pass]August 1, 2014 at 3:18 am #150032In reply to: Random Topic Link
Robin W
Moderatorok, need to work out if menu issue or function issue
So eliminate function by creating a test page and putting
echo '<a href="/?random=1">Random Post</a>' ;onto the test page and confirm it works.
-
AuthorSearch Results