• Resolved Sagano

    (@sagano)


    My site is having a problem with the “Read more”-button displayed with the excerpt of an achievement – nothing happens when clicking.

    Instead you have to click the badge or the title of the achievement to get to the actual achievement. This only happens whit achievements I’ve added to pages as single achievements though, not with the ones that are part of achievement lists.

    Any suggestion on how to solve this?

    Here’s a link to a page with single achievements: https://bitfrbit.se/miljostegen/steg-1/

    And here’s one to a page with an achievement list: https://bitfrbit.se/bitar/mat/

    Since my site is in swedish, the “Read more”-button says “L?s mer”.

    https://www.ads-software.com/plugins/badgeos/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Michael Beckwith

    (@tw2113)

    The BenchPresser

    Not quite sure what’s going on for this.

    For example, the entire portion of “Spola bara ner toapapper och det som g?tt genom kroppen i toaletten.” and the button right below it are generated from the following:

    $output .= '<div class="badgeos-item-excerpt">';
    $output .= badgeos_achievement_points_markup( $achievement->ID );
    $excerpt = !empty( $achievement->post_excerpt ) ? $achievement->post_excerpt : $achievement->post_content;
    $output .= wpautop( apply_filters( 'get_the_excerpt', $excerpt ) );
    $output .= '</div><!-- .badgeos-item-excerpt -->';

    I suspect the get_the_excerpt filter may be part that’s generating the link, and we don’t do anything custom to that other than use it in this case here.

    Do you have any links in the excerpt field for your achievements, just as a just in case?

    Thread Starter Sagano

    (@sagano)

    No, no links in any of the excerpt fields ??

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    Chances are they’re getting added via the get_the_excerpt filter then, at this point, because that’s the entry point as far as I can tell. The returned link is not the right one for the achievement at hand.

    Thread Starter Sagano

    (@sagano)

    Ok, is there anything I can do about it?

    Thread Starter Sagano

    (@sagano)

    I don’t understand why it works fine with the achievement lists but not with the single achievements…

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    There’s likely some filter being applied to get_the_excerpt somewhere that’s creating/generating the markup, that’s done outside of BadgeOS itself. Why it’s working on some urls and not others is something that I don’t know.

    Are you able to deactivate plugins or change themes at the moment? or is it a pretty live site? Curious if a filter is being added by something else.

    Thread Starter Sagano

    (@sagano)

    I tried deactivating all plugins except BadgeOS first one by one and then all of them at once, but no difference. Then I tried other themes, but strangely enough the “Read more”-button didn’t even show in any of them.

    So, perhaps a solution is to use a different theme and then either insert a button via some other plugin, or hope my site’s members click on the achievements without being asked to.

    Michael Beckwith

    (@tw2113)

    The BenchPresser

    I’d start looking through your functions.php or other php-included files to see where the theme uses the filter in question, and how it does.

    Shouldn’t need to be so drastic as to change themes completely to fix this.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘'Read more' button not working on single achievements’ is closed to new replies.