The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Share:
Notifications
Clear all

[Solved] offset scrolling

6 Posts
2 Users
1 Reactions
1,126 Views
Posts: 5
Topic starter
(@odi20)
Active Member
Joined: 3 years ago

Hi, My website has a fix header with height of 49px. After commenting, it scroll the page to the start of comment that is under the fix header. How can I offset to scroll in +49px?

5 Replies
Asti
Posts: 7615
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

@odi20,

You'll be able to control this using the wpdiscuz_js_options hook in the next version of the wpDiscuz plugin. The new parameter will be added, so it'd be possible to control it. 

4 Replies
(@odi20)
Joined: 3 years ago

Active Member
Posts: 5

@asti Thanks, so i have to wait. Any estimated time for release? 🤩

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

I'm sorry, but we can't provide any ETA yet.

Asti
 Asti
Support
(@asti)
Joined: 7 years ago

Illustrious Member
Posts: 7615

Hi @odi20,

Here is the solution:

add_filter("wpdiscuz_js_options", function($options){
    if (!empty($options["scrollSize"])) {
        $options["scrollSize"] = 130;
    }
    return $options;
});

You'll just need to change the red marked value as it's necessary in the case of your website. 

The code should be put in your active theme functions.php file.

(@odi20)
Joined: 3 years ago

Active Member
Posts: 5

@asti Thank you. Perfectly worked.

Share: