Skip to:
Content
Pages
Categories
Search
Top
Bottom

Changing classes on Blog Directory “Visit Site” Action Button


  • bennypowers
    Participant

    @bennypowers

    Howdy
    I want to change the classes on the action button in the site directory of my WPMU/BP site. The button is rendered by the hook bp_directory_blogs_actions which in functions.php:138 calls bp_blogs_visit_blog_button, located in bp_blogs_template.php:1602

    So how do I get in there and change those classes?

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

  • shanebp
    Moderator

    @shanebp

    Did you try using the provided filter hook in function bp_blogs_visit_blog_button ?

    apply_filters( 'bp_get_blogs_visit_blog_button', $button )

    $button is an array that includes class elements.


    bennypowers
    Participant

    @bennypowers

    Here’s my broken snippet. I think I’m not grokking something about apply_filters()

    <?php
    
    $button = array(
      'wrapper_class' => '',
      'link_class' => 'read-more-button'
    );
    
    apply_filters( 'bp_get_blogs_visit_blog_button', $button );
    
Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar