Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 2,126 through 2,150 (of 32,460 total)
  • Author
    Search Results
  • #216363
    Robin W
    Moderator

    so what is that bit of code trying to do ?

    #216360
    Robin W
    Moderator

    I’ve just taken a look at your site

    the issue is the css

    .newposts {
    	float: left;
    	background-color: #DD9933;
    	padding: 5px 6px;
    	margin: -65px 5px 2em 0;
    }

    if you take out the ‘margin: -65px 5px 2em 0;’ then the code is on screen, otherwise it is offscreen

    #216359
    Robin W
    Moderator

    ok, so

    1. can you post the exact code you are now using
    2. can you tell me where your are putting this code?

    #216358
    akira010203
    Participant

    That’s right! And when I check on the source code in a browser while non loggued, I can clearly see the code with the button.

    #216357
    Robin W
    Moderator

    that’s no problem, and yes it doesn’t look like the issue is in there.

    so the original code works fully with logged in, but not at all with non logged in- yes?

    #216346
    akira010203
    Participant

    It detect the folder “templates” in the theme. (orange color)

    CSS part is green.

    I’ve installed a fresh version of my original theme + created a new child theme.

    If I modify the function.php of the original theme, all works well.
    If I add my content to the function.php of my new child theme, nothing appears…

    I can’t get the new child theme working, like my current one.

    Anyway, strange thing is that I can see the piece of code when I inspect the source with a browser :

    	<div class="bbp-breadcrumb"><p><a href="xxx" class="bbp-breadcrumb-home"><span class="bsp-home-icon"></span></a> <span class="bbp-breadcrumb-sep">&rsaquo;</span> <span class="bbp-breadcrumb-current">Forum</span></p></div>
    	
    	<p><a href="lasts-topics-posts/"><div class="newposts">Show new posts</div></a></p>
    	
    		
    <ul id="forums-list-0" class="bbp-forums">

    It seems to be hidden by something..

    #216341
    Robin W
    Moderator

    ok, just tested and my original code works fine on my test site.

    it could be a theme or plugin issue

    Themes

    As a test switch to a default theme such as twentytwenty, and see if this fixes.

    Plugins

    If that doesn’t work, also deactivate all plugins apart from bbpress and see if this fixes. if it does, re-enable one at a time to see which is causing the error.

    If you cannot do this to your site (say because it is live) then use the ‘troubleshooting’ features of this plugin to let you test without affecting other users

    Health Check & Troubleshooting

    Then come back

    #216333
    akira010203
    Participant

    Thanks Robin but I don’t think this is the easiest way for me to make this button available for users and guests.

    When [bbp-topic-index] is available for all (no restrictions in my board), I just need to put my button available for everyone.

    I’ve tried this :

    add_action ('bbp_template_before_forums_index' , 'rew' ) ;
    
    function rew () {
    if(!is_user_logged_in()) return;
    echo '<p><a href="new-posts/"><div class="newposts">Show new posts</div></a></p>' ;
    }

    and

    function rew () {
    
     if ( is_user_logged_in() ) {
    echo '<p><a href="new-posts/"><div class="newposts">Show new posts</div></a></p>' ;
    }
    else
    echo '<p><a href="new-posts/"><div class="newposts">Show new posts</div></a></p>' ;
    }

    But doesnt works..

    #216318
    akira010203
    Participant

    Hello Robin, once again your advice rocks!

    Here is my result :

    Function.php of my child theme :

    add_action ('bbp_template_before_forums_index' , 'rew' ) ;
    
    function rew () {
    echo '<p><a href="new-posts/"><div class="newposts">Show new posts</div></a></p>' ;
    }

    and my css :

    .newposts {  
    	 float: left;
    	 background-color:#DD9933;
             padding: 5px 6px;
    	 margin:-65px 5px 2em 0;
    			
    }
    
    .newposts a { 
            color:#f2f2f2 !important;
    	border:none;
    	border-radius:0;
    	box-shadow: none;
    	color:#ffffff;
    	font-size:13px;
    }
    
    @media(max-width:580px) {
    .newposts {  
    	float: right;
    	background-color:#DD9933;
    	padding: 5px 6px;
            margin:-15px 0px 2em 0;
    			
    }
    
    .newposts a { 
            color:#f2f2f2 !important;
    	border:none;
    	border-radius:0;
    	box-shadow: none;
    	color:#ffffff;
    	font-size:13px;
    }
    }

    I had to make a custom CSS to get it responssive with mobile phones.

    I still got a little issue which is that my buton dn’t appear when you’re not connect, I need to fix that!

    #216316
    Robin W
    Moderator

    there is a hook in the content-archive-forum.php file you can use

    bbp_template_before_forums_index

    so

    add_action ('bbp_template_before_forums_index' , 'rew' ) ;
    
    function rew () {
    //your code here eg
    echo 'hello' ;
    }
    #216315
    Robin W
    Moderator

    just tried a shortcode in the footer of my test site running twentyten, and it works on both bbpress and non bbpress pages using the text widget

    #216313
    archux
    Participant

    The function is_bbpress() is for any page of bbpress

    Does not matter, it is account or forum or topic… on all pages…
    Footer is built with visual composer…

    If i use a shortcode to display forum index, the footer works fine. as soon i click into form:

    https://<domain>/forums/forum/<forum name>/ footer breaks
    https://<domain>/forums/topic/<topic name>/ footer breaks
    https://<domain>/forums/user/<user name>/ footer breaks

    It becomes as: [vc_row full_width=”stretch_row” css=”…” ….]…….[/vc_row]

    Looks like on those page the WordPress function do_shortcode is disabled/unactivated…

    Do this make more clear on what pages and what happens with footer?

    #216312
    Robin W
    Moderator

    can you give an example – eg of a footer shortcode that breaks and what bbpress page

    archux
    Participant

    Hi

    This is a major issue with bbpress and I could not find a resolution to it. I found couple of similar requests but no one have full resolution.

    Basically, if page can be recognized as is_bbpress() true than the footer shortcodes breaks.

    How to fix that? Is there some patch?

    #216273
    akira010203
    Participant

    I dit the trick with some CSS improvments :

    width: 100px;
    padding: 2px;

    @media(max-width:580px) {
    div#bbpress-forums {
    overflow: visible !important;
    }
    	#bbpress-forums span.bbp-admin-links a,
    			#bbpress-forums span.bbp-admin-links 
    			{
    				width: 100px;
    				padding: 2px;
    				color: grey;
    			}
    }
    #216252
    LBandy
    Participant

    No worries Robin, I appreciate you are trying to help!

    Your question raises a very valid point – I didn’t think it could be related. I currently have my Forums page set up like this:

    Recent topics
    
    [bbp-topic-index]
    
    All topics
    
    [bbp-forum-index]
    #216249
    uscjohn
    Participant
    #216247
    Robin W
    Moderator

    sorry, working across many things and missed that.

    so that page is made up of ‘all topics’ and ‘recent topics’ – are these shortcodes on a page, or how is this page content created?

    #216241
    berry metal
    Participant

    Oh and I forgot to mention that I did test it by deactivating plugins and changing theme. The issue persists, when the shortcode is used.
    Is AJAX enabled for the buttons if the Subscribe and Favorite buttons are used within the Replies shortcode?

    #216239
    flamuren
    Participant

    Many thanks I will give it a try. However there is so many things that is not working properly so its starting to become a case for some freelancer site. I dont really know what I am doing 🙂

    I read your guide: https://codex.bbpress.org/step-by-step-guide-to-setting-up-a-bbpress-forum/

    But I cant get the forum to display using method 1 in the above guide. And method 2 is the one I have done from the start but cant get to look the way i want.

    If the plugin “bbp style pack” fix the design, there is still the issue with weird menus and different urls within the forum etc. Could it be that I created the forum before changing WP-theme? Could it help to remove BB-press and then reinstall it from the ground up?

    #216226
    Babak Fakhamzadeh
    Participant

    Yeah, that should be fine, @neon67.

    In my point 4, above, you would add a tab for your private chats and then just include the shortcode via a print do_shortcode().

    #216224
    Robin W
    Moderator

    if within content you can use

    How to filter bbpress content in WordPress

    but if at the bottom of ‘bbpress’ pages, then there are a bunch of actin hooks you can link to

    do_action( 'bbp_template_after_forums_index' );
    do_action( 'bbp_template_after_topics_loop' );
    do_action( 'bbp_template_after_replies_loop' );
    do_action( 'bbp_template_after_user_profile' );
    do_action( 'bbp_template_after_search_results_loop' );

    should get you most of the way there

    #216220
    neon67
    Participant

    Hello! I want to add a new tab to the User profile with the “private messages” shortcode (separate plugin). In order for users to be able to operate with their message box inside the profile.
    May be done by @mastababa way?
    Where need to put the message-shortcode at the last stage of example coding (or first make a page with a shortcode and then insert it?)

    #216211
    Lars Henriksen
    Participant

    Hello,

    I would like to use autoptimize on a site with bbpress, but aggregating Js-files breaks the bbpress editor.

    By searching the forum I found this topic, but maybe more files have to be excluded in 2.6?

    Does anyone here aggregate bbpress js succesfully – if so, how?

    Thanks, Lars

    #216189
    Robin W
    Moderator

    the setting is ‘bmen_mute’ and if present then email not sent. If absent, then email sent

    so

    $do_not_send = get_user_meta ($user_id, 'bmen_mute' , true) ;
    if (empty ($do_not_send)) {
    //then send
    }
    else {
    //do not send
    }
Viewing 25 results - 2,126 through 2,150 (of 32,460 total)
Skip to toolbar