Skip to:
Content
Pages
Categories
Search
Top
Bottom

Register custom view with extra_fields

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

  • specstanza
    Participant

    @specstanza

    To anyone who would come accross the same project, I added an action to the bbp_theme_before_topic_title hook.

    For now, it does not displays as I would like but some CSS will do the trick.

    add_action('bbp_theme_before_topic_title', 'show_true_title');
    function show_true_title() { 
    $topic_id = bbp_get_topic_id();
      $true_title = '<li><a href="' . get_permalink() . '">' . get_post_meta( $topic_id, 'bbp_extra_field1', true); '</a>';
    echo $true_title ;

    Robin W
    Moderator

    @robin-w

    thanks for posting your solution.

    you could do

    add_action('bbp_theme_before_topic_title', 'show_true_title');
    function show_true_title() { 
    $topic_id = bbp_get_topic_id();
      $true_title = '<li class="specstanza-title"><a href="' . get_permalink() . '">' . get_post_meta( $topic_id, 'bbp_extra_field1', true); '</a></li>';
    echo $true_title ;

    and then in css do

    li.specstanza-title {
    color: blue;
    }

    or

    .specstanza-title {
    color: blue;
    }

    or

    .specstanza-title li {
    color: blue;
    }

    one of those should let you style the title


    specstanza
    Participant

    @specstanza

    Thank you @robin-w !
    My first idea was to display:none the_title but I’m definitely going to keep it.

    I found the solution by installing a plugin called Hookr. It gave me some informations I needed after hours reading Bbpress’ files.

    The ouput is a bit strange though…
    Output true_title

    As if the voice-count moved somewhere. The author is also displayed twice – I don’t remember it was like that before. Changing the shortcode used doesn’t improve this.

    I’m going to figure out what happened here and keep this thread updated if it’s usefull for someone. 🙂


    Robin W
    Moderator

    @robin-w

    do keep this updated – so many threads have the problem but authors don’t post their final solution – you are a star!!

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