Home › Forums › Front End PM PRO › How to make notification bar sticky on scroll
- This topic has 11 replies, 2 voices, and was last updated 3 years, 8 months ago by Shamim Hasan.
- AuthorPosts
- January 12, 2022 at 6:07 am #44097c.cooperParticipant
I have a sticky header that shrinks and stays to the top of page on scroll. On scroll the FEP notification bar moves and leaves a 114px gap at top of page(above the header/menu). How can I keep the FEP notification bar in place (sticky) on scroll?
Thanks!
January 16, 2022 at 9:08 pm #44111Shamim HasanKeymasterYou can use
#fep-notification-barto add any css to notification bar.
Try adding following code in Front End PM PRO > Settings > Appearance > Custom CSS#fep-notification-bar { position: fixed; }March 8, 2022 at 12:25 am #44293c.cooperParticipantHi, tried that and the gap remains, probably due the head builder (dynamic header). Is there a way to add that bar as a shortcode?
Thanks,
CCMarch 8, 2022 at 3:57 am #44295c.cooperParticipantI found this.
https://sp-test1.arogga.co/docs/front-end-pm/getting-started/show-unread-message-count-in-menu/One of these will work.
Thanks!March 8, 2022 at 5:03 am #44297c.cooperParticipantSo, I tried these as well. There seems to be a jump on the menu when the page loads, the menu shifts. Back to needing the message. Is there a way to make that message bar a shortcode to embed as a part. The size of our header shrinks.
The fixed position of the notification bar hides the header/menu in part.
Thanks!
CCMarch 9, 2022 at 6:55 pm #44305Shamim HasanKeymasterYou can then directly use
fep_notification_div()function which will echo the bar. You can show where you like.March 9, 2022 at 10:56 pm #44314c.cooperParticipantNot sure of the syntax on how to add this. Sorry, I don’t want to blow up the site with the wrong syntax.
<?php echo fep_notification_div(); ?>
I’m using Beaver themer for page templates and a snippet app for php.
March 10, 2022 at 10:44 am #44316Shamim HasanKeymasterI recommend you to use a staging website first to test changes and after tested, update live site.
Also, this function already echo, so no need to add echo there.
March 11, 2022 at 1:08 am #44319c.cooperParticipantHi I tried to insert that after header in a Generate Press element (both with and without the semi-colon. With and without executing php. Only would show raw text in the container.
fep_notification_div()
fep_notification_div();March 12, 2022 at 10:58 pm #44333Shamim HasanKeymasterIf php can execute it should echo header bar.
You can also try adding that directly in template php file.March 31, 2022 at 1:29 am #44393c.cooperParticipantI am using Generatepress hooks. This code is not working. Tried after header content, before main content. It’s not working in any of these hooks where php is executed. See example in screen shot below.
April 8, 2022 at 11:29 pm #44410Shamim HasanKeymasterDo you use unread messages in inbox? That bar will only show if you have unread messages.
If still not working can you please contact that theme/plugin author if they have any idea why this code is not executing?
- AuthorPosts
You need to purchase ‘Front End PM PRO’ to create topic in this support forum.
If you already purchased ‘Front End PM PRO’ please LOGIN.