[Support request] Insert shortcode immediately below Post title

Home Forums Support [Support request] Insert shortcode immediately below Post title

Home Forums Support Insert shortcode immediately below Post title

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #819012
    Penny

    I’d like to insert a shortcode directly under the title on Single Posts.

    I’ve read your https://docs.generatepress.com/article/using-hooks-conditional-tags/#single-posts and https://docs.generatepress.com/article/adding-php/ articles, and identified the generate-after-entry-title hook. Also, I installed the Code Snippets plugin.

    But now I’m stuck. Can you outline what steps I need to take?

    #819161
    Leo
    Staff
    Customer Support

    Hi there,

    Have you considered using Hooks Element instead?
    https://docs.generatepress.com/article/hooks-element-overview/

    It should save you from writing the code.

    Let me know ๐Ÿ™‚

    #819775
    Penny

    Hi Leo,

    Thanks for pointing me to Hooks Elements.

    I’m getting the DISALLOW_FILE_EDIT message and have read different takes on whether or not it’s safe to allow file edits.

    What is recommended?

    #819848
    Tom
    Lead Developer
    Lead Developer

    If someone gained access to your Dashboard and were able to write PHP, they could potentially gain access to your server.

    This is why DISALLOW_FILE_EDIT exists, to prevent a bad user from writing PHP in the Dashboard.

    That being said, these days they could likely just install a plugin like Code Snippets and write it anyways.

    If your Dashboard is secure (strong password, 2FA), then this is less of an issue, and you can probably allow file editing.

    #820593
    argosmedia

    An even more powerful alternative to the Hooks element is Extender Pro: https://cobaltapps.com/downloads/extender-pro-plugin/
    It’s a premium extension (so paid), and not related to Tom or GP, but it is fully compatible with GP and also with other leading general frameworks/themes. It’s a perfect companion to GP, and its author Eric is just as friendly and supportive as Tom ๐Ÿ™‚
    Highy recommended!

    I’m affiliated with neither GP nor Cobalt Apps, I’m just a happy user.

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