[Resolved] Breadcrumbs in template

Home Forums Support [Resolved] Breadcrumbs in template

Home Forums Support Breadcrumbs in template

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1410351
    Matthew

    How can I get breadcrumbs in a specific location of a template?

    So far I have a hook for the Media location with ‘generate_after_main_content’.

    It’s close but I would like to precisely put the breadcrumbs into a div.

    #1410370
    Leo
    Staff
    Customer Support

    Hi there,

    Not sure if I fully understand.

    Using hook is definitely the correct method.

    It’s close but I would like to precisely put the breadcrumbs into a div.

    Which div are you trying to add it in?

    #1410414
    Matthew

    Is there the ability to position the breadcrumb where I want.

    See the picture below. The breadcrumbs are there according to the hook but can it go into the div above it. Its just a normal div in my template file for media attachments.

    https://drive.google.com/file/d/145YM6I4WwDttIhx1ZvFcCfB6hRJusJk7/view?usp=sharing

    Alternatively can I box it so it has a background and is not floating on the main page background area. Also centered possibly as well.

    #1410743
    David
    Staff
    Customer Support

    Hi there,

    the generate_after_content hook is within the article container.

    #1412216
    Matthew

    OK generate_after_content is actually a good spot for my blog but I am still wondering if i can tailor a location of my own for the attachment template.

    What’s “Custom Hook” under the hook drop-down? Can I create one name it and use the code where I want it, i.e.

    <?php
    /**
     * my_custom_name hook.
     *
     * @since 0.1
     */
    do_action( 'my_custom_name' );
    ?>
    #1412471
    David
    Staff
    Customer Support

    Yes, if its a custom template then you can add the do_action code where you require it.
    Then you can select Custom Hook and Enter its my_custom_name

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.