Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 551 through 575 (of 32,453 total)
  • Author
    Search Results
  • #237056

    In reply to: Problem adding table

    Robin W
    Moderator

    Ok, I tried to look, but cannot see any obvious fix for this, I’m not sure how the code is working that sends this – sorry I’m not able to help further.

    #237052
    Robin W
    Moderator

    it can be combinations, so yes, I want to eliminate that.

    Given that at the moment I have the problem as :

    On registration:

    worpdress has no role
    bbpress has participant role

    so you need subscriber role to be set

    then I am struggling to see how bbpress is ‘unsetting’ the subscriber role.

    #237031
    Robin W
    Moderator

    Now I have to edit the file

    ok so you have already put :

    function rkk_widgets_init() {
     
        register_sidebar( array(
            'name' => __( 'bbPress Sidebar', 'rkk' ),
            'id' => 'bbp-sidebar',
            'description' => __( 'A sidebar that only appears on bbPress pages', 'rkk' ),
            'before_widget' => '<aside id="%1$s" class="widget %2$s">',
            'after_widget' => '</aside>',
            'before_title' => '<h3 class="widget-title">',
            'after_title' => '</h3>',
        ) );
        }
     
    add_action( 'widgets_init', 'rkk_widgets_init' );

    into your child theme functions file – yes ?

    and then did this

    I chose the left-sidebar-page.php of my theme, copied it into my child theme and replaced <?php get_sidebar(); ?> with <?php dynamic_sidebar( ‘bbp-sidebar’); ?>. Because I read this in another topic of a theme salient user.

    which replaces the second part of 26, as you have chosen the left-sidebar rather than just sidebar

    yes ?

    so what exactly are you stuck on?

    #237025
    eefkedigibitch
    Participant

    Hi there,

    I’m trying to create a specific sidebar in my website. I’ve been reading about it in this forum and I’m following step 26 of the article ‘Layout and functionality – Examples you can use’.
    What I did so far;
    1. I added the code to register the sidebar in my functions.php of my child theme.
    2. I chose the left-sidebar-page.php of my theme, copied it into my child theme and replaced <?php get_sidebar(); ?> with <?php dynamic_sidebar( ‘bbp-sidebar’); ?>. Because I read this in another topic of a theme salient user.
    Now I have to edit the file like the example that’s mentioned in the article, but I don’t understand it. So this is where I get stuck.

    Can someone please help me?! I’d really appreciate it!

    Kind regards,
    Eve

    Ps. My website has a shop and LearnDash courses. The forum is meanly for the course participants and should be connected to the specific LearnDash courses. The theme I’m working with is Salient. The only other sidebar I have is the woocommerce sidebar.

    #237008
    juanm777
    Participant

    Hi,

    I am using the WP mail SMTP – Plugin, and bbpress is not sending emails (notifications) through this plugin.

    After searching on the web, I found a similar issue on BuddyPress,

    Buddypress registration ignoring WP Mail SMTP

    They solved it with this code:

    add_filter(‘bp_email_use_wp_mail’, ‘__return_true’);

    Is there a similar procedure for bbpress?

    Thanks

    Juan

    #237005
    newtech1
    Participant

    I understand completely. Makes sense.
    I will have to find a plugin that makes it so I can limit permissions and capabilities per user role.
    There is Permissions Pro and Capabilities Pro plugins that give me all that I need but sadly they do not support ‘topic’ posts. Do you know of any other plugins?

    BTW
    I have ACF to work great for me in the backend. All I need to do is put this code in content-single.php Maybe this will help somebody else who is using ACF with BBPress
    `?>
    YOU CHOOSE HOW MUCH INFORMATION YOU ENTER<br>
    Catch Date & Time: <?php the_field( ‘catch_date_time’ ) ; ?><br>
    Anglers: <?php the_field( ‘anglers’ ) ; ?><br>
    Weather: <?php the_field( ‘weather’ ) ; ?><br>
    Fish Caught: <?php the_field( ‘fish_caught’ ) ; ?><br>
    Kept or Released: <?php the_field( ‘kept_or_released’ ) ; ?><br>
    Lake Point Marker: <?php the_field( ‘lake_point_marker’ ) ; ?><br>
    Water_Features: <?php the_field( ‘water_features’ ) ; ?><br>
    Speed: <?php the_field( ‘speed’ ) ; ?><br>
    Fish Depth: <?php the_field( ‘fish_depth’ ) ; ?><br>
    Lake Depth: <?php the_field( ‘lake_depth’ ) ; ?><br>
    Method Used: <?php the_field( ‘method_used’ ) ; ?><br>
    Lure & Color: <?php the_field( ‘lure_color’ ) ; ?><br>

    Image:
    <?php
    $image = get_field(‘image’);
    if( !empty( $image ) ): ?>
    ” alt=”<?php echo esc_attr($image[‘alt’]); ?>” />
    <?php endif; ?> <br>

    <br>
    <br>
    Fishing Location: <?php the_field( ‘location’ ) ; ?><br>
    <?php
    $location = get_field(‘location’);
    if( $location ): ?>
    <div class=”acf-map” data-zoom=”13″>
    <div class=”marker” data-lat=”<?php echo esc_attr($location[‘lat’]); ?>” data-lng=”<?php echo esc_attr($location[‘lng’]); ?>”></div>
    </div>
    <?php endif; ?>

    <style type=”text/css”>
    .acf-map {
    width: 100%;
    height: 400px;
    border: #ccc solid 1px;
    margin: 20px 0;
    }

    If there was a way to make this code or another code to work in the frontend posting topics I would be thrilled to death. BUT ACF will not help me for BBPress and BBPress will not help me for ACF. If I knew code more I am sure I could figure it out. It cannot be that hard.

    #237001
    newtech1
    Participant

    My forum is set up so that a forum user can only post in the backend/dashboard of my wordpress site because I never was able to get ACH plugin to work on the forum frontend. On the backend the ACF is working fantastic when a user posts a new topic.

    However, the new issue is that the only way a forum user can see the topic link in the dashboard is if they are a moderator or higher. My users will not be moderators but participates. Is there a way via code to make it so participants can log into the dashboard and see the topic link.
    http://www.thedoverfamily.com/images/topics_link.jpg

    #236992
    waprothero
    Participant

    Robin:
    Following your simple instructions for a snippet, I just wanted to check to make sure I’m making the test you suggested (thanks, btw):

    Snippet Content, using wpCode snippet plugin:

    add-action(‘plugins_loaded’,’rew_remove_bbp_role’);
    function rew_remove_bb_role'(){
    remove_action( ‘bbp_user_register’,’bbp_user_add_role_on_register’,10,1);
    }

    Snippet location: Universal Snippet

    Is this correct?

    #236982

    In reply to: Hide posts number

    newtech1
    Participant

    Update:
    I put the following code in the customized css for one website and it removed the Voices column, but on another website it did not remove the voices column. Yes, I cleared all cache and used GeoPeeker to make sure it was not a cache issue.
    `li.bbp-topic-voice-count {
    display: none !important;
    }

#236981
newtech1
Participant

I thought another solution was to just put the shortcodes in the wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php file but the shortcodes do not work.

#236980
newtech1
Participant

I am wanting my bbpress tags and bbpress search input form to display on my forum main page just below the bread crumbs.
This is what I understand to do.
A. Copy my page.php template from by theme folder. (..//wp-content/themes/fishingclub)
B. Rename it bbpress.php and upload to the theme folder.
(I do this and the forum main page displays properly.)
Here is the page,php code:

<?php
/**
 * The template for displaying all single pages
 *
 * @package WordPress
 * @subpackage FISHING_CLUB
 * @since FISHING_CLUB 1.0
 */

get_header();

while ( have_posts() ) { the_post();

	get_template_part( 'content', 'page' );

	// If comments are open or we have at least one comment, load up the comment template.
	if ( !is_front_page() && ( comments_open() || get_comments_number() ) ) {
		comments_template();
	}
}
get_footer();
?>

C. Since I want to display bbpress tags and bbpress I need to put these shortcodes in the bbpress.php template: [bbp-topic-tags] and [bbp-search], BUT the page crashes no matter where I put the shortcode.
D. I assume I must put some kind of coding before and after the shortcode. No idea what I need to do.

#236979
newtech1
Participant

I have removed the column titled ‘voices’ by this code in custom css:

li.bbp-topic-voice-count {
    display: none !important;
}

I want to hide the column with the title ‘Posts’. Is there a way to do this also via custom css?

#236976
Robin W
Moderator

ok, for the moment, I’d suggest you add the code snippets plugin, that gives you an area to put it in.

That will let us test to get to a problem definition.

Once we know if this (or something else) is the solution, then we can get it into the right place, but I would prefer to be sure that the code is functioning so code snippets gives that certainty

#236975
waprothero
Participant

Robin, thanks for your response. I’m out of town until Monday and will try out your suggestions then. Some quick question tho. I’m an experienced programmer, but not with wordpress. I’m unclear where to insert these code items. So….
_———-here’s your suggestion
so use this code

—where do I add this this.. To the bbPress functions file?
add_action (‘plugins_loaded’ , ‘rew_remove_bbp_role’) ;

function rew_remove_bbp_role () {
remove_action( ‘bbp_user_register’, ‘bbp_user_add_role_on_register’, 10, 1 );
}

Put this in your child theme’s function file –
I am guessing this goes in wp initiation file.

ie wp-content/themes/%your-theme-name%/functions.php

where %your-theme-name% is the name of your theme

#236974
Robin W
Moderator

as a test, let’s stop it adding the forum role on registration to see if that is interfering.

so use this code

add_action ('plugins_loaded' , 'rew_remove_bbp_role') ;

function rew_remove_bbp_role () {
	remove_action( 'bbp_user_register',   'bbp_user_add_role_on_register', 10, 1 );
}

Put this in your child theme’s function file –

ie wp-content/themes/%your-theme-name%/functions.php

where %your-theme-name% is the name of your theme

or use

Code Snippets

and then let me know if this makes a difference

#236973
Robin W
Moderator

ok, but it is the equivalent of asking me to diagnose the strange sound of your car by sending me a photo of the engine. A link lets me see what code is being sent to the browser.

Topics are typically greyed when they are closed – what state is this topic, and have you tried creating others to see if it is juts this one, or all topics are doing it?

#236957

In reply to: Prevent topic replies

Robin W
Moderator

and with this one try

content-single-topic.php

and remove the line

<?php bbp_get_template_part( 'form', 'reply' ); ?>

#236956
Robin W
Moderator

ok, not quite sure why, but in that case

find
wp-content/plugins/bbpress/templates/default/bbpress/content-single-forum.php

transfer this to your pc and edit

take out the line

<?php bbp_get_template_part( 'form', 'topic' ); ?>

which is in twice, so remove 2 times

and save

create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress

where %your-theme-name% is the name of your theme

Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/content-single-forum.php

bbPress will now use this template instead of the original

#236955

In reply to: Prevent topic replies

newtech1
Participant

Are you saying to replace the existing code in form-reply.php just with this code? If so my forum page is ‘page not found’.

<?php

/**
 * New/Edit reply
 *
 * @package bbPress
 * @subpackage Theme
 */

// Exit if accessed directly
defined( 'ABSPATH' ) || exit;

I believe this shoudk end with
<?
but it still does not work.

#236954
newtech1
Participant

Are you saying that I am to replace all of the code in form-topic.php with just this code:
`<?php

/**
* New/Edit Topic
*
* @package bbPress
* @subpackage Theme
*/

// Exit if accessed directly
defined( ‘ABSPATH’ ) || exit;

if ( ! bbp_is_single_forum() ) : ?>

<div id=”bbpress-forums” class=”bbpress-wrapper”>

</div>

<?php endif;’

If so the when I go to my forum page it says ‘page not found’.

#236953

In reply to: Prevent topic replies

Robin W
Moderator

find
wp-content/plugins/bbpress/templates/default/bbpress/form-reply.php

transfer this to your pc and edit

make the file read

<?php

/**
 * New/Edit reply
 *
 * @package bbPress
 * @subpackage Theme
 */

// Exit if accessed directly
defined( 'ABSPATH' ) || exit;

and save

create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress

where %your-theme-name% is the name of your theme

Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/form-reply.php

bbPress will now use this template instead of the original

#236951
Robin W
Moderator

find
wp-content/plugins/bbpress/templates/default/bbpress/form-topic.php

transfer this to your pc and edit

make the file read

<?php

/**
 * New/Edit Topic
 *
 * @package bbPress
 * @subpackage Theme
 */

// Exit if accessed directly
defined( 'ABSPATH' ) || exit;

if ( ! bbp_is_single_forum() ) : ?>

<div id="bbpress-forums" class="bbpress-wrapper">

	

</div>

<?php endif;

and save

create a directory on your theme called ‘bbpress’
ie wp-content/themes/%your-theme-name%/bbpress

where %your-theme-name% is the name of your theme

Then transfer the file you saved above and put in in the directory called bbpress that you created above, so you end up with
wp-content/themes/%your-theme-name%/bbpress/form-topic.php

bbPress will now use this template instead of the original

#236949

In reply to: Prevent topic replies

newtech1
Participant

I need to clarify. I do not want the reply option to appear anywhere in the forum. I do not want the option for replies-just turn off the reply feature.

If I cannot turn off the reply form what file do I go into to remove the code for the reply form so it does not show up?

The problem with making topic closed is it greys out the topic title. I do not want the title to grey out. So if I cannot remove the reply form someway how can I prevent the title from turning grey when closed?

closed topic

#236948
newtech1
Participant

I do not want anyone, including members, to be able to post topics on the frontend of the forum, just through backdoor. How do I remove that option? It appears the code is form-forum.php file but cannot determine what code I need to remove. What I have tried keeps giving me ‘page not found’.remove front end posting

#236946

In reply to: a user login problem

Passepoil
Participant

Hello Robin,
Yes, the site is under development.
I’m thinking of creating a specific button for logging into the account and redirecting the Internet user to the home page afterwards.
I realized that the connection was done well by changing the page afterwards but not on the page where the widget is installed.
Maybe there is a trick (php code in functions.php) to work around this problem?
Thanks for your help.

Viewing 25 results - 551 through 575 (of 32,453 total)
Skip to toolbar