Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 11,051 through 11,075 (of 32,504 total)
  • Author
    Search Results
  • #150090
    Nitac
    Participant

    My 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?

    #150088

    In 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.

    https://gist.github.com/ntwb/8167699

    #150083

    In reply to: Importing for SMF 1.x

    Stephen Edgar
    Keymaster

    Most likely you are either not using or an incorrect table prefix.

    Open your SMF Settings.php with 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_

    #150075
    Stephen Edgar
    Keymaster

    Make sure your users are triggering any ‘bad words’ in WordPress comment moderation.

    Moderation and BlackListing

    #150073
    Stephen Edgar
    Keymaster

    If 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

    #150069
    Stephen Edgar
    Keymaster

    I am not sure what you mean, bbPress does not include any links titles details

    Could you explain it in more detail please, maybe some screenshots if that will help and/or a link to your forums.

    #150068
    Stephen Edgar
    Keymaster

    This is neat, thanks for sharing your code @korobochkin

    #150067
    Stephen Edgar
    Keymaster

    This is a theme issue, you should make a copy of your page.php file and rename it bbpress.php in your themes folder.

    #150065
    Stephen Edgar
    Keymaster

    Nice, thanks for the follow up and code 🙂

    #150064
    Stephen Edgar
    Keymaster

    You copy the files to /mytheme/bbpress as 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.

    #150063

    In reply to: Install Language

    Stephen Edgar
    Keymaster
    #150061
    Stephen Edgar
    Keymaster

    Should 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.

    #150057

    In reply to: Mobile display

    Robkk
    Moderator

    are 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

    #150056
    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

    #150055
    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.

    #150049

    In reply to: Full Width Forum Help

    Robin W
    Moderator

    ok, 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 !

    #150048

    In reply to: Random Topic Link

    Robin W
    Moderator

    Absolutely 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

    #150047

    In reply to: Random Topic Link

    joejozwowski
    Participant

    could I put that in a page or post, rather than the code?

    #150045

    In reply to: Full Width Forum Help

    aussiestar14
    Participant

    Hope 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>

    #150044
    tonydes
    Participant

    Thanks 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!

    #150043
    Robkk
    Moderator

    Step by step guide to setting up a bbPress forum – part 2

    heres is a straight link to where you need to be, but reading the whole page isnt bad too

    #150041
    Robin W
    Moderator

    ok, 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

    Step by step guide to setting up a bbPress forum – Part 1

    #150039
    tonydes
    Participant

    Hi 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!

    #150034

    In reply to: login and registration

    Robin W
    Moderator

    yes 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]
    
    #150032

    In reply to: Random Topic Link

    Robin W
    Moderator

    ok, 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.

Viewing 25 results - 11,051 through 11,075 (of 32,504 total)
Skip to toolbar