[Support request] Changing sticky bar to have different output for single post

Home Forums Support [Support request] Changing sticky bar to have different output for single post

Home Forums Support Changing sticky bar to have different output for single post

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #963226
    jasmeet

    Hello

    Had been figuring out if GP theme has the enhanced functionality with sticky bar to have different output for Single Post Templates somewhat like seen here apart from the usual output seen globally –

    https://slackhq.com/etiquette-tips-in-slack

    as the sticky bar changes to output logo+Current post (being read)+social sharing icons

    Kindly guide if there is such option

    #963473
    Leo
    Staff
    Customer Support

    Hi there,

    The search to icons can likely be done with some CSS.

    However, the post title would require a custom solution unfortunately.

    Let me know if this helps ๐Ÿ™‚

    #963528
    jasmeet

    Hi

    Thanks for the response

    However, Rendering the post title is more important from UX perspective also. Social icons sticky is also fine which is being managed through plugin

    Can you kindly suggest for some solution here

    #963744
    Leo
    Staff
    Customer Support

    Ok let’s try one step at the time.

    Add this PHP to create a shortcode to output the title:

    add_shortcode( 'the_title', function() {
        return get_the_title();
    } );

    Adding PHP: https://docs.generatepress.com/article/adding-php/

    Then create a new hook element with <div class="menu-title">[the_title]</div> and use the inside_navigation hook:
    https://docs.generatepress.com/article/hooks-element-overview/

    Set display rules to all posts.

    Then I’ll tackle the CSS.

    #968367
    jasmeet

    Hi

    Thanks for providing the precise steps however, the same doesn’t render blog title as envisaged. I might be missing something

    Can you kindly review again

    #968536
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    Is the code live right now?

    If not, what about it isn’t working, exactly?

    Let me know ๐Ÿ™‚

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