Giter VIP home page Giter VIP logo

Comments (4)

knightknight avatar knightknight commented on May 31, 2024 1

Works in OceanWP fine, needs CSS styles though. Just need to use the right hook!

// Off-Canvas Sidebars
function offcanvas_oceanwp_before() {
  do_action('website_before');
}
add_filter( 'ocean_before_outer_wrap', 'offcanvas_oceanwp_before' );

function offcanvas_oceanwp_after() {
 do_action('website_after');
}
add_filter( 'ocean_after_outer_wrap', 'offcanvas_oceanwp_after' );

from off-canvas-sidebars.

JoryHogeveen avatar JoryHogeveen commented on May 31, 2024 1

Hi @knightknight
Thanks for your reply and code example!

Indeed, this plugin does noting with styling of content within off-canvas sidebars (slidebars).
That is up to the developer of the theme!

And to comment on your code example, it wouldn't even be needed in this case:

In the general settings you have an option to overwrite the hooks used for website_before and website_after. If you change those to ocean_before_outer_wrap and ocean_after_outer_wrap it should work fine out of the box.
Thank for providing this example, I'll add it to this list: https://github.com/JoryHogeveen/off-canvas-sidebars/wiki/Compatible-theme-hooks

@sofiaspain
Let me know if this also works for you!

Regards, Jory

from off-canvas-sidebars.

JoryHogeveen avatar JoryHogeveen commented on May 31, 2024

Hi @sofiaspain

Every theme works different so it's allways hard to say. Do you have a link so I can take a look? It might be a JavaScript incompatibility with the scripts from your theme or plugins.

Thanks, Jory

from off-canvas-sidebars.

knightknight avatar knightknight commented on May 31, 2024

overwrite the hooks

Awesome, didn't think of that!!. ๐Ÿ‘

from off-canvas-sidebars.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.