Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Breadcrumbs after a specific block

  • Hey,

    Is it possible to put my breadcrumbs like this site in the private area have done?

  • Hi there,

    Where on your site would it be placed ? As the ideal solution would be to create page hero section with the breadcrumbs as part of it.

  • Hey, on all pages expect for the home page. Under the blue top area.

  • Can you link us to your page in question so we can provide the best method possible?

  • Hey,

    I have put it in the private area second link.

  • Ok so David’s suggestion is definitely the way to go:

    As the ideal solution would be to create page hero section with the breadcrumbs as part of it.

    Here is the doc for the Block element Page Hero he is referring to: https://docs.generatepress.com/article/block-element-page-hero/

  • Hey,

    With a page hero like you mentioned can I change the background color for all pages, link in the button and so on?

  • Sorry but not sure if I understand the question.

    I clicked a few pages and all the background colors are the same (blue) and I don’t see any buttons.

  • Hey,

    The new design is similar to the first link in the private information.

  • Will all pages require a different background color ?

  • Hey,

    Yes different background color and different link on the button.

  • Ok.
    You would need to add Custom Fields to your posts.
    One to store the color and one to store the link.

    For example to do the Button Link:
    Using the ACF Plugin register an own Field Group for your Singles Posts.

    1. create a URL Field to store your link and make a note of the Field Name.

    2. in the page hero add a GB Button block
    2.1 in the button links URL field add #
    2.2 activate its Dynamic Data
    2.2.1 set the Link Source to Post Meta and in the field provided add your Field name.

    3. Now on each post you can add the Link in the Custom Field.

    For the color changes this requires a little more work.

    1. Create another custom field in your field group , this time choose the Color Picker field.
    1.1 make a note of the field name as it will be used in some code.
    For this example I will use a field name of hero-color-value

    2. in the Customizer > Colors add a new Color to the pallet and call it hero-colour and set its color to the default color.

    3. Now in your page hero set the Containers Background color using that new color.

    4. Add this PHP Snippet to the site:

    
    function insert_hero_color_css() {
        if (is_single() || is_page()) {
            // Get the ACF field value
            $hero_color = get_field('hero-color-value');
            
            if ($hero_color) {
                // Output the CSS with the hero color value
                echo "<style>body { --hero-color: ' . $hero_color . '; }</style>";
            }
        }
    }
    add_action('wp_head', 'insert_hero_color_css');
    

    That PHP will get the hero-color-value and replace the hero-colour you set in the customizer.

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