Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'code'

Viewing 25 results - 3,576 through 3,600 (of 32,481 total)
  • Author
    Search Results
  • #202837
    Robin W
    Moderator

    too many possibilities to discuss – this is like asking how to get my car to go faster.

    I’d suggest you start with your hosting company, and discuss with them.

    also

    System and Server Requirements

    dudo001
    Participant

    It’s simple [bbp-single-topic id=724]
    but there is not any result on the webpage.
    Clicking on WP Menus->Forums at Forum-ID the number 724 is shown.
    Via the hyperlink https://www.domain.com/root/forum/forum1/ the Topics are shown correctly.

    The shortcodes [bbp-topic-index] and [bbp-stats] (without any ID) on the other hand work perfectly.

    Robin W
    Moderator

    can you give an example of exactly what you have as a shortcode that doesn’t work

    dudo001
    Participant

    Ok, the hyperlink I found myself,
    but I can’t guess why the single-shortcodes don’t show anything…

    dudo001
    Participant

    by the way:
    Do you know why the single-shortcodes of bbPress don’t work?
    [bbp-single-topic] [bbp-single-forum] [bbp-single-reply] [bbp-single-tag] and so on
    have absolute no effect

    Robin W
    Moderator

    hmmm…. that would be quite hard to code, lots of places where you would need filters.
    Unlikely I’d look at that.

    Robin W
    Moderator

    ok, as a product you can do

    add_action( 'digimember_purchase', 'digitest_purchase', 10, 4 );
    function digitest_purchase( $user_id, $product_id, $order_id, $reason )
    {
        switch ($reason)
        {
            case 'order_paid':
            // handle paid orders here
    			if ($product_id == '12') {
    		update_user_meta ($user_id , 'private_group' , '*group1*') ;
    		}
            break;
    
            case 'order_cancelled':
    		if ($product_id == '12') {
            delete_user_meta ($user_id , 'private_group' ) ;
    		}
            break;
    
            case 'payment_missing':
            // handle missing rebilling payment here
            break;
        }
    }

    where in this case ’12’ is the product id of the subscription product

    time period and other conditionals are I’m afraid well beyond free help

    dudo001
    Participant

    Hi Robin,

    thxs a lot for your big help!
    Since I’ll do something like that first time, it may take a while…

    Watching the code, there are a two things I don’t understand:
    1. Since I have different products in my digimember-account, where in the code is specified which product the user must have bought to become member of group1?
    2. Since “order cencallation” and “payment missing” should both result in finishing the membership of the user, why doesn’t have to be the same “delete user-meta”-parameter in the code for both cases?

    Thxs again for your help,
    cu, Roman

    Robin W
    Moderator

    yes, that is helpful

    so this code will add a user to private group 1 on paying membership, and take them out on cancellation

    add_action( 'digimember_purchase', 'digitest_purchase', 10, 4 );
    function digitest_purchase( $user_id, $product_id, $order_id, $reason )
    {
        switch ($reason)
        {
            case 'order_paid':
            // handle paid orders here
    		update_user_meta ($user_id , 'private_group' , '*group1*') ;
            break;
    
            case 'order_cancelled':
            delete_user_meta ($user_id , 'private_group' ) ;
            break;
    
            case 'payment_missing':
            // handle missing rebilling payment here
            break;
        }
    }

    Put this in your child theme’s function file – or use

    Code Snippets

    Then set up forums so that group 1 users can access the forum, and everyone else just see it

    Robin W
    Moderator

    ok, you will need to research or find out if digimember has a ‘hook’ on membership joining that can be used to add a member to a group.

    so the question to them might be

    I am using digimember and need a wordpress hook (action or filter) that I can link a user becoming a member to carry out some further actions.

    If they or you can answer, I can give you some simple code

    #202677
    Robin W
    Moderator

    the simplest way would be to create a wordpress page for each ‘country’, eg a page called ‘france’, and then put the shortcode for that forum in then content

    [bbp-single-forum id=$forum_id]

    where $forum_id is the id of the forum for france

    #202661
    Robin W
    Moderator

    I’d suggest that as a test you deacativate LearnDash & bbPress Integration nand see if the error persists, from the link I can’t tell what is sending this code

    #202647
    zezoalbayari
    Participant

    Hello. I‘m using free astra theme, elemntor pro, WooCommerce, bbPress and LearnDash in my website.

    I’m trying to make a custom “my-account” which comes with woocommerce. and I did using the short code and elementor. but since I’m using bbpress too, I wanted to view the bbpress user profile that’s located by defualt in “example.com/forums/user/******”

    what I did: i created a custom endpoint “/my-account/forums/” and since I wanted the dynamic content. i thought i can use the templates of bbpress. so I added code #1 in my theme functions.php and copied the code of user-profile.php from the bbpress templates into my forums.php that i created in astea/WooCommerce/myaccount/

    code #1

    `function my_custom_endpoint_content() {
    include ‘woocommerce/myaccount/forums.php’;
    }
    add_action( ‘woocommerce_account_forums_endpoint’, ‘my_custom_endpoint_content’ );

    what happened: it showed the content, but it views the data of a normal vistor – non-logged in user- instead of pulling the current user.

    so any ideas on how to achieve such a thing ? maybe there is a another method that’s not even related to what I’m trying to do ?

    #202329
    kat772
    Participant

    I saw this blog and this might actually help.

    Step One: Duplicate your header.php file and name it header-new.php. You can replace the word new with something that makes sense for your website.

    Step Two: Open up the Page.php file associated with the template that you want to use. Then replace the normal header code with the code below. Update the page id number with the correct page number on your site. Change the get_header(‘new’) to match the alias used in step one.

    <?php
    if(is_page(10)) {
    get_header(‘new’);
    }
    else {
    get_header();
    }
    wp_head();
    ?>
    Step Three: Make your changes within the header-new.php file, and walah! You have successfully created a second header!

    If you’re looking to create a second footer, simply follow the steps above but make your changes to the footer-new.php file instead.

    jkw217
    Participant

    I am experiencing 404 errors on forum and topic views. It appears to be at random and not all the time.

    Got error 'PHP message: PHP Notice: Undefined offset: 0 in /wp-content/plugins/bbpress/includes/topics/capabilities.php on line 80\nPHP message: PHP Notice: Undefined offset: 0 in /wp-content/plugins/bbpress/includes/replies/capabilities.php on line 62

    I have re-saved permalinks, changed->saved then changed-back->saved and still have the 404 errors occasionally.

    I googled this error and found:
    https://wordpress.org/support/topic/capabilities-undefined-offset-error-with-bbpress/

    I tried updating the capabilities.php file as discussed but still having issues.

    Does anyone have any experience with this problem and have a fix?

    bitlupus
    Participant

    Hi all,

    trying to rebuild this case. Also want to make each post “likeable”, but if I use the source code above and paste it at same part in

    Add after <?php bbp_reply_admin_links(); ?> in loop-single-reply.php

    it won’t work… You also said, paste it in functions.php – functions.php for replies?
    Or is there a better (maybe built in) solution created in the past two years?

    thanks a lot

    #202240
    Robin W
    Moderator

    basically you will need a link from teachable to fire up code in wordpress to create the user.

    I can only suggest you contact the ‘teachable’ authors to see if they have a hook you can use, or google for linsk eg

    https://zapier.com/apps/teachable/integrations/wordpress

    #202171
    maksanse
    Participant

    Hello John,
    Thank you for your answer !
    Here is a small video to show you my issue : https://www.dropbox.com/s/wcfqnysi7esby74/bbpress-shortcode-pages.mp4?dl=0

    I think the issue comes from my LearnDash plugin because the pages where I include the shortcodes are handled by LearnDash.

    Here is for example an anonymized url where the shortcode doesn’t work as expected:
    https://QQQ.com/formations/QQQ/modules/module-4-sketchnoting/chapitres/chapitre-1-QQQ/

    The “page/2/” added to the url when cliking to the link (https://QQQ.com/formations/QQQ/modules/module-4-sketchnoting/chapitres/chapitre-1-QQQ/page/2/) doesn’t go to the wanted page, it create an error 404.

    The best that could happen here would be to be able to link the pagination buttons to the dedicated forum page, but I don’t know if it is possible…

    Best regards and thank you for your help!

    #202158

    In reply to: change forum sidebar

    amandainjames
    Participant

    I think you want to add a custom widget in your theme. You can add custom widget adding this code in functions.php

    function wpblog_widget()
    {
        register_sidebar(array(
            'name' => __('Primary Sidebar', 'wpb'),
            'id' => 'primary_sidebar', // unique-sidebar-id
            'description' => '',
            'class' => '',
            'before_widget' => '<li id="%1$s" class="widget %2$s">',
            'after_widget' => '</li>',
            'before_title' => '<h2 class="widgettitle">',
            'after_title' => '</h2>',
        ));
    
    }
    
    add_action('widgets_init', 'wpblog_widget');

    Reference: WordPress Custom Widgets

    #202153
    amandainjames
    Participant

    I will suggest you to go through a WordPress custom taxonomy tutorial. Here are three steps to create a custom taxonomies in WordPress. To create a custom taxonomy you have to add this code in functions.php

    add_action( 'init', 'create_cw_hierarchical_taxonomy', 0 );
    //create a custom taxonomy name
    function create_cw_hierarchical_taxonomy() {
    $labels = array(
    'name' => _x( 'Topics', 'taxonomy general name' ),
    'singular_name' => _x( 'Topic', 'taxonomy singular name' ),
    'search_items' => __( 'Search Topics' ),
    'all_items' => __( 'All Topics' ),
    'parent_item' => __( 'Parent Topic' ),
    'parent_item_colon' => __( 'Parent Topic:' ),
    'edit_item' => __( 'Edit Topic' ),
    'update_item' => __( 'Update Topic' ),
    'add_new_item' => __( 'Add New Topic' ),
    'new_item_name' => __( 'New Topic Name' ),
    'menu_name' => __( 'Topics' ),
    );
    // taxonomy register
    register_taxonomy('topics',array('post'), array(
    'hierarchical' => true,
    'labels' => $labels,
    'show_ui' => true,
    'show_admin_column' => true,
    'query_var' => true,
    'rewrite' => array( 'slug' => 'topic' ),
    ));
    }
    #202145
    fantomx90
    Participant

    Hello,

    I am using the bbPress forums currently, and whenever we create a topic it is this grayed out color… We did find a custom CSS code to use, and it DOES work for Closed topics, but all others it still stays grayed out. What can we do to fix this?

    Also, whenever someone is typing a reply it still displays in this awful gray color. How would I change the default color of the text being used in our forum?

    (For reference, here is the code we used for black Closed topics:)
    #bbpress-forums .status-closed,
    #bbpress-forums .status-closed a {
    color: #000 !important;
    }

    (And yes, we did try just switching closed with open in the coding lol.)

    Thank you.

    #202140

    You won’t get much advice about other forum software in these forums, as these forums are for bbPress (not against it.)

    The support in these forums is all volunteer based. No one gets paid to be around to help. Everyone is passionate, but no one is obligated. We have great moderators that keep things clean, but your experience is not uncommon – it helps to be your own site admin.

    I see you’ve created 6 topics here, 1 of them was asking for some code help, and 2 of them (including this one) are general gripes with (not) getting things working how you’d like them to without anything really to say back?

    bbPress is intentionally simple forum software. It’s opinionated but flexible, so you get a pretty basic experience out of the box, but it requires a bit of determination to customize it to do exactly what you want it to.

    You’re right that most hosting providers are generally disinterested in helping with websites themselves; they’re in the business of making sure websites work, so they’re not spending much time deep into how plugins and themes look or feel or work with one another. They’ll probably redirect you back here for most bbPress questions.

    If you’re the only person running your community, and you’re unable to keep things working on your own, I can understand why you feel the way you do. I can tell you that bbPress.org runs an unmodified version of bbPress that has required very little ongoing maintenance. All we’ve done here is create a WordPress theme to make things feel a little bit more like a forum than a blog. Together with WordPress.org we do have 11 million user accounts and a high volume of concurrent users across multiple different forums.

    It sounds like your forums might be more active than ours here, but it’s hard to know exactly what glitches and problems you’re having, and most things aren’t as easy as coding a snippet for you and having you drop it in someplace.

    I’m sorry that your experience with bbPress hasn’t been pleasant. I’m not sure what more to say, other than if you keep with it and keep learning, it is a very capable and fun piece of software that helps hundreds of thousands of communities run really smoothly. Hopefully that continues to include yours!

    #202134

    In reply to: Turn off @mentions

    Try unhooking them:

    remove_filter( 'bbp_make_clickable', 'bbp_make_mentions_clickable', 8 );

    #202133

    The breadcrumbs are automatically generated based on the page or archive hierarchy.

    Try: Admin > Settings > Forums

    Forum Root: community/fora
    Forum Prefix: Unchecked

    Then for all of the Single Slugs, prefix them with community/.

    You could also try creating a WordPress Page hierarchy that has “community” as the first slug and “fora” as the second child page, then use a bbPress shortcode in the content of that page.

    #202132

    bbPress.org uses shortcodes on a few archive pages, but in a way where the pagination links already naturally match the permalink & slug structure.

    Can you reply and include an anonymized version of the pagination structure that you’re seeing?

Viewing 25 results - 3,576 through 3,600 (of 32,481 total)
Skip to toolbar