Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpForo community!

Merry Christmas and Happy Holidays! 🎄

wpForo 1.x.x [Solved] Some css help for mentions

9 Posts
3 Users
3 Reactions
1,759 Views
dimalifragis
Posts: 2600
Topic starter
(@dimalifragis)
Famed Member
Joined: 6 years ago

Hello,

Any css guru to provide the correct css for doing this (the @matt rounded background):

Thank you

(also pls include it in your next vs2 version)


Topic Tags
8 Replies
Tutrix
Posts: 1521
(@tutrix)
Noble Member
Joined: 6 years ago

i use this little code to add a css class to it

add_action( 'wp_head', function () { ?>
<script>
    $(document).ready(function () {

        $('.wpforo-post-content a:contains("@")')
		    .addClass("member-nickname");
    });
</script>
<?php } );

now you can style via .member-nickname

for the code I use the Code Snippets plugin

surely also works with the functions.php of your WP Theme


5 Replies
dimalifragis
(@dimalifragis)
Joined: 6 years ago

Famed Member
Posts: 2600

@tutrix Thanks.

This code produces some error when f12 is viewed (something like wrong content loaded).


Tutrix
(@tutrix)
Joined: 6 years ago

Noble Member
Posts: 1521

@dimalifragis 

I don't get any error


dimalifragis
(@dimalifragis)
Joined: 6 years ago

Famed Member
Posts: 2600

@tutrix Well .. i dunno.

I use a custom pseudo-plugin for all my functions and adding that produces an error.


dimalifragis
(@dimalifragis)
Joined: 6 years ago

Famed Member
Posts: 2600

The error is:

 

Uncaught TypeError: $ is not a function


Tutrix
(@tutrix)
Joined: 6 years ago

Noble Member
Posts: 1521

@dimalifragis 

ok try this code

add_action( 'wp_head', function () { ?>
<script>
    jQuery(document).ready(function($) {

        $('.wpforo-post-content a:contains("@")')
		    .addClass("member-nickname");
    });
</script>
<?php } );

dimalifragis
Posts: 2600
Topic starter
(@dimalifragis)
Famed Member
Joined: 6 years ago

@tutrix Thanks, that latest works and i was able to style it like i wanted !!


1 Reply
(@percysgrowroom)
Joined: 7 years ago

Noble Member
Posts: 1229

@dimalifragis same 🙂

Thanks Tutrix!