BuddyDev

Search

[Resolved] tried to limit categories in buddyblog now it will not render

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #18742

    Hi Phil,
    Thank you.

    Sure, you can change the slug like this

    
    define( 'BP_BUDDYBLOG_SLUG', 'battleblog');
    

    Please put it in the bp-custom.php

    Also, Since you have modified the BuddyBlog tab using Profile Tabs Creator, Please make sure to change the slug to “battleblog” there too.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 66
    phil may on #18758

    Ok will do, thanks. And another question I think you might k ow the answer because it relates to buddypress alot, with wordpress, buddypress and dokan I have too many similar profile fields. Is there a way to make them all share the same tables so I dont get massive database overhead? Like all 3 should use the same tables for first and mast name etc, no need for 3 …

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #18763

    Hi Phil,
    About your last question, For WordPress and BuddyPress, I don’t know of any existing solution that does it.

    For dokan, I will suggest asking the plugin developer if they can use BuddyPress fields as the source of data.

    Regards
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 66
    phil may on #19176

    Brajesh, for some reason after updating BP none of this code in my child theme functions.php is working, the slug stays buddyblog and all cats + tax show:

    define( 'BP_BUDDYBLOG_SLUG', 'battleblog');
    function buddydev_add_default_category_to_post( $post_id ) {
        
    	$tax = array_filter( $_POST['tax_input'] );
    	
    	if( empty( $tax ) && $post_id ) {
    		//no category was set
    		$term = 79;//ID
    		wp_set_object_terms( $post_id, $term, 'category' );
    		
    	}
        }
    
    function buddyblog_show_custom_cats( $settings ) {
    	$tax = array();
    
    	$tax['category'] = array(
    
    		'taxonomy'  => 'category',
    		'view_type' => 'dd',
    		'child_of'  => 91, //CHANGE It with the correct ID,
    		'orderby'   => 'slug',
    		'order'     => 'ASC'
    	);
    
    	$tax['post_tag'] = array(
    
    		'taxonomy'  => 'post_tag',
    		'view_type' => 'dd',
    		'include'   => array( 83,85,88,92),// tag ids.
    		'orderby'   => 'slug',
    		'order'     => 'ASC',
    	);
    
    	$settings['tax'] = $tax;
    
    	return $settings;
    }
    add_filter( 'buddyblog_post_form_settings', 'buddyblog_show_custom_cats', 100 );
    add_action( 'bsfep_post_saved', 'buddydev_add_default_category_to_post' );

    I never had a bp-custom.php, I just used the child function file and it worked before. If that is why its not woorking now where in my child can i add that file?

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #19194

    Hi Phil,
    I am not sure but most probably your child theme got deactivated. Please check and make sure that your child theme is active.

  • Participant
    Level: Enlightened
    Posts: 66
    phil may on #19222

    youre absolutely correct, i dont know why but when i try to activate it again it just activates the parent theme…

  • Participant
    Level: Enlightened
    Posts: 66
    phil may on #19223

    yeah something is very wrong, the child theme is enqueueing twentyseventeen not arcane. this makes absolutely no sense to me, even restoring a backup from when it was working properly isnt fixing it

  • Keymaster
    (BuddyDev Team)
    Posts: 24712
    Brajesh Singh on #19224

    Hi Phil,
    That’s strange. Have you had anyone modify the child theme? Can you please check your child theme and post me what you see at the top of the style.css?

  • Participant
    Level: Enlightened
    Posts: 66
    phil may on #19225
    
    /*
    Theme Name: Arcane Child
    Theme URI: http://www.skywarriorthemes.com/arcane/
    Author: Skywarrior themes
    Author URI: http://www.skywarriorthemes.com/
    Description: Arcane gives you the power to create massive gaming communities. Users can create clans and challenge each others, keeping track of the matches, share content and much more!
    Version: 1.0
    Template: arcane
    License: Skywarrior Themes. All rights reserved.
    License URI: http://themeforest.net/user/Skywarrior
    Tags: one-column, two-columns, right-sidebar, custom-background, custom-header, custom-menu, editor-style, featured-images, flexible-header, full-width-template, microformats, post-formats, rtl-language-support, sticky-post, theme-options, translation-ready
    Text Domain: arcane
    */
    #settings-personal-li {
    display: none !important;
    }
    
  • Participant
    Level: Enlightened
    Posts: 66
    phil may on #19226

    this is the top of the functions.php

    <?php
    add_action( 'wp_enqueue_scripts', 'arcane_enqueue_styles' );
    function arcane_enqueue_styles() {
        wp_enqueue_style( 'parent-style', get_template_directory_uri() . '/style.css' );
    
    }

You must be logged in to reply to this topic.

This topic is: resolved