Site logo

Archived topic

sticky top bar and show page title

3 replies · Started by Sam on September 21, 2019

Viewing posts 1–4 of 4

Hi!

I'm very happy with how my website is looking. Almost finished - it has 70 pages and growing...

I'd like to know if you can help me with two things:

1 - I'd like to know if it is posible to make the top bar sticky independently of the sticky menu;

2 - Is it posible to show on the top bar, in a widget (html code widget for instance), the post or page title?

Thanks in advance.

Hi there,

1. Would require some CSS, we can help with that if you can share a link.
2. Would be easier to use the Hook Element to output the Post title using the before_header hook. You could use some markup like so:

<div class="grid-container custom-top-bar">
    <h2><?php the_title(); ?></h2>
</div>

The grid-container class is a GP class and will keep the content contained. The other class you can name what you like and style it how you need.

Hey

I am trying to achieve the same. I am using discourse forum for my website. And I love the fact that discourse displays the topic title in the sticky header when scrolling down.

Example:
https://meta.discourse.org/t/discourse-2-2-0-beta5-release-notes/103097

Would you mind posting the function to put the post title into the sticky header?

Hi there,

would be best to raise a new topic where you can share a link to your site privately as it will require some tweaking to suit your site.

This archived topic is closed to new replies.