Shortcode for message notification icon?  


power505
Posts: 20
(@power505)
Eminent Member
Joined: 10 months ago

Is it possible to place an icon that we have on right side of the menu (see image attached) somewhere else with a shortcode or on some other way?

Ultimately I would like to have a message icon on the global site header. I managed to do it with Buddypress plugin but would be happy to replace it with this addon for Wpforo.

4 Replies
power505
Posts: 20
(@power505)
Eminent Member
Joined: 10 months ago

Also, is it possible to display this notification on the global site, on parts outside of WPforo?

Reply
Astghik
Posts: 3476
Admin
(@astghik)
Support Team
Joined: 2 years ago

Hi @power505,

Is it possible to place an icon that we have on right side of the menu (see image attached) 

I'm really sorry, but there is no option for this.

However, the developers provide a solution for you. Please follow the steps below:

1. Put the following Code in your active them's functons.php file:

add_action('YOUR_CUSTOM_HOOK_NAME', function(){WPF_PM()->tpl->show_pm_note();});

2. The code below should be added in the theme's files, where you'll need to display the icon

do_action('YOUR_CUSTOM_HOOK_NAME');

In case if the style is missing just put the following code instead of the one mentioned in point 1. 

add_action('YOUR_CUSTOM_HOOK_NAME', function(){WPF_PM()->tpl->show_pm_note(true);});
Reply
2 Replies
power505
(@power505)
Joined: 10 months ago

Eminent Member
Posts: 20

@astghik

Hi, thanks for the quick reply. Hovewer, you didn't provide me a hook name. This doesnt do anything.

EDIT: Oh, how stupi I am. Didn't see the rest of the code on mobile. Thanks!

What about my other question?

Reply
Astghik
Admin
(@astghik)
Joined: 2 years ago

Support Team
Posts: 3476

@power505

What about my other question?

Oh sorry, I've forgotten to mention about it. 

I've asked the developers and they said that probably we'd add it in future updates. However, the feature may slow down the website, thus this requires a long time to find optimal ways for the changes. 

Reply
Share:
Green
Default
Pear
Black Emo
{green}:grinning:
{green}:wink:
{green}:face:
{green}:inlove:
{green}:sweaty:
{green}:surprised:
{green}:lovekiss:
{green}:laugh:
{green}:formalsmile:
{green}:displeased:
{green}:cool:
{green}:resent:
{green}:nerd:
{green}:screaming:
{green}:amazed:
{green}:sad:
{green}:deceitful:
{green}:starryeyes:
{green}:evil:
{green}:shocked:
{green}:tears:
{green}:sulky:
{green}:smile:
{green}:vomited:
{green}:hi:
{green}:afraid:
{green}:crazy:
{green}:rabid:
{green}:fighting:
{green}:nonoise:
{green}:blushed:
{green}:idontknow:
{green}:scared:
{green}:razz:
{green}:kiss:
{green}:eat:
{green}:shutmouth:
{green}:gape:
{green}:suspicious:
{green}:laughingoutloud:
{green}:bruise:
{green}:crying:
{green}:pray:
{green}:serious:
{green}:excitement:
:)
:d
:wink:
:mrgreen:
:neutral:
:twisted:
:arrow:
:shock:
:???:
:cool:
:evil:
:oops:
:razz:
:roll:
:cry:
:eek:
:lol:
:mad:
:sad:
:!:
:?:
:idea:
:hmm:
:beg:
:whew:
:chuckle:
:silly:
:envy:
:shutmouth:
{pear}:happy:
{pear}:smile:
{pear}:laugh:
{pear}:laughingoutloud:
{pear}:crying:
{pear}:exhausted:
{pear}:nerd:
{pear}:surprised:
{pear}:veryhungry:
{pear}:wink:
{blackemo}:laughtertotears:
{blackemo}:gift:
{blackemo}:love:
{blackemo}:inlove:
{blackemo}:shamefaced:
{blackemo}:heart:
{blackemo}:crazy:
{blackemo}:anguished:
{blackemo}:bruise:
{blackemo}:easymoney:
{blackemo}:exhausted:
{blackemo}:vampire:
{blackemo}:shutmouth:
{blackemo}:wink:
{blackemo}:carnival:
{blackemo}:flowers:
{blackemo}:hotdrink:
{blackemo}:party: