BuddyDev

Search

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

  • Keymaster
    (BuddyDev Team)
    Posts: 24344
    Brajesh Singh on #18652

    No problem.

    Updating the buddyblog_show_custom_cats to this

    
    
    function buddyblog_show_custom_cats( $settings ) {
    	$tax = array();
    
    	$tax['category'] = array(
    
    		'taxonomy'  => 'category',
    		'view_type' => 'dd',
    		'child_of'  => 91, //CHAGE It with the correct ID,
    		'orderby'   => 'slug',
    		'order'     => 'ASC'
    	);
    
    	$tax['post_tag'] = array(
    
    		'taxonomy'  => 'post_tag',
    		'view_type' => 'dd',
    		'include'   => array( 1,2,3),// tag ids.
    		'orderby'   => 'slug',
    		'order'     => 'ASC',
    	);
    
    	$settings['tax'] = $tax;
    
    	return $settings;
    }
    

    should do it. I have not tested it, I am hoping that it works.

    replace the old function with the same name with it.

    About last few issues:-
    1. If you want, you can create yourtheme/buddyblog/posts.php and override the whole layout(for custom query, please see buffyblog/templates/buddyblog/posts.php)

    2. Please see 1
    3. You are logged in as admin. By default BuddyBlog lets admin edit post in the backend. You can control who will see edit from backend link in the BuddyBlog settings. Normal users will be doing it from front end.

    Regards
    Brajesh

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

    Hi, trying that now, about #3, i was logged in as a contributor not admin.

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

    ok that worked perfect for adding tags, thanks again man!

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

    so if i enable “allow users to edit post” they will have access to backend? I thought that allows them to edit on the front.

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

    ok i see, i added a capability to it thats why, my mistake!

  • Keymaster
    (BuddyDev Team)
    Posts: 24344
    Brajesh Singh on #18658

    Thank you. Glad you found the setting.

    Regards
    Brajesh

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

    this is the template my theme uses for blog posts:
    https://pastebin.com/pQ4eDZf3

    how do i get the styles from this to apply to buddyblog?

  • Keymaster
    (BuddyDev Team)
    Posts: 24344
    Brajesh Singh on #18663

    Thank you for sharing it.
    I am about to leave for a few hours.
    will assist you later today when I am back to work again.

    Regards
    Brajesh

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

    https://pastebin.com/RRMKCKsP

    thats the correct template, my bad

  • Keymaster
    (BuddyDev Team)
    Posts: 24344
    Brajesh Singh on #18668

    Hi Phil,
    The last code you have share is for single post. I need it for the archive post(the posts loop).

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved