Skip to:
Content
Pages
Categories
Search
Top
Bottom

Remove Separator


  • MaxLiao
    Participant

    @maxliao

    My question is simple, but for the life of me I cannot find the answer.

    I am creating my own theme from scratch. Currently I’m working on bbPress integration. So far everything is going well; however, I would like to remove the | separator that appears between Favorite and Subscribe (Favorite | Subscribe) when viewing a post. I cannot find where this dang separator is located and it needs to be gone.

    Please see the attached image for further clarification. You’ll quickly see how the separator does not belong.

    Bad Separator

    thank you for any assistance.

Viewing 6 replies - 1 through 6 (of 6 total)

  • Robin W
    Moderator

    @robin-w

    quick reply as I’m on my way out, so untested, but put the following in your functions file

    function remove_sep ($args) {
    $args['before' ] = '' ;
    Return $args ;
    }
    
    add_filter ('bbp_before_get_topic_subscription_link_parse_args', 'remove_sep') ;
    

    If it doesn’t work, come back and I’ll do it properly and test it for you !


    Robin W
    Moderator

    @robin-w

    Previous response edited to correct


    MaxLiao
    Participant

    @maxliao

    First of all, thank you for the response. I really appreciate your help.

    Unfortunately, that code did not work; the separator is still there. You indicated that was a possibility, so no worries.

    Since this doesn’t seem like a matter of just finding a | in some code and removing it or adding a display:none; to the CSS to remove it, is there a resource that would better help me understand how this is being accomplished? I would hate to have to ask this same question every time I want to add or remove a separator. My PHP skills exist but they are weak. Anything to help strengthen them in this regard would be fantastic.


    Robin W
    Moderator

    @robin-w

    never write code whilst your other half is waiting to go out !

    ok, this works

    function remove_sep ($args) {
    $args['before'] = '' ;
    return $args ;
    }
    
    add_filter ('bbp_before_get_forum_subscribe_link_parse_args', 'remove_sep') ;
    

    On your larger point, there are a lot of resources, but it takes a lot of practice to get good at PHP, and to understand how any plugin works which is the size that bbpress is.

    Generally it is quicker to ask a question on here, than spend hours delving into bbpress. But if you start wanting to really tailor it, then the step by step guides and other documentation will try and get you into how to go about finding code within bbpress.

    I know nothing of php 18months ago (I’m just a humble bbpress user – I didn’t write any of it!), and now have several plugins for bbpress to add functionality, so it is quire do-able.

    I’ve tried to get much of my learning into the documentation, so have a look round

    Codex


    MaxLiao
    Participant

    @maxliao

    Yep, I just got home from work and confirmed that it worked perfectly. Thank you very much, you have been most helpful!

    In regard to the rest, I think my frustration comes from the fact that I never would have considered a function as a separator. I was looking at the template PHP/HTML and the CSS coding, but it never even crossed my mind that it would be written as a function – nor did any of my searches indicate that. That’s cool though, now that I know I’m hopefully better able to resolve these issues in the future.


    Robin W
    Moderator

    @robin-w

    No problem !

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
Skip to toolbar