No announcement yet.

add hook location on page template

  • Filter
  • Time
  • Show
Clear All
new posts

  • add hook location on page template

    not sure if this is a silly question or not... but i've figured out how to get breadcrumbs to appear conditionally on my page-builder.php pages, however they appear outside of the content in my BB layouts. i can adjust this with loads of media queries but am wondering if its possible to add a hook back into the template that's more in line with the width of the genesis_before_content or genesis_before_loop hooks?

    thanks for any insight.

    site password: beets

  • #2
    I don´t know your default width and media queries but you could simply write a bit custom CSS and put it in a media query for only larger screens, something like:

    Code: .breadcrumb {
    max-width: 1140px ;
    margin: 0 auto;
    Or you could digg Beaver community if there´s a hook available that puts it into Beaver content area. The pagebuilder template naturally removes all Genesis/DWB divs/wrapper that would restrict width so that pagebuilders can go full width.

    OR you could even digg for articles how to do your breadcrumbs with Beaver (maybe there´s a module out there?)...
    Last edited by SiGa; 10-10-2017, 06:38 AM.


    • #3
      well that little bit of code worked a treat, thanks! while my css is vastly improved from where it was a couple years ago, those kinds of adjustments are not in my wheelhouse.

      that said, im gonna take up your advice about breadcrumbs in BB... that's a great lead.

      so appreciate the help


      • SiGa
        SiGa commented
        Editing a comment
        You´re welcome, glad I´ve been able to help.

    • #4
      quick follow up on this— the folks at BB dont have a module for breadcrumbs specifically BUT you can create a breadcrumbs shortcode that you can then place into a BB HTML module anywhere in your layout!

      code for breadcrumb shortcode:

      HTML Code:
      //* Create shortcode 
      add_shortcode( 'breadcrumbs', 'breadcrumbs_shortcode' );
      function breadcrumbs_shortcode() {
          return ob_get_clean();
      add_filter( 'widget_text', 'do_shortcode' );
      remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
      with this in your custom functions, simply place [breadcrumbs] in a HTML widget and you should be good to go!