[Support request] Inserting standard text in posts

Home Forums Support [Support request] Inserting standard text in posts

Home Forums Support Inserting standard text in posts

Viewing 15 posts - 1 through 15 (of 24 total)
  • Author
    Posts
  • #2208820
    Tom

    Is there any way to automatically insert copy at the top and bottom of all posts?

    I tried using a hook, but can’t seem to get it to format correctly (like the post) and land in the correct location (within the copy, at top and bottom.)

    site is https://travelpast50.com.

    Thanks.

    #2208843
    David
    Staff
    Customer Support

    Hi there,

    it is – but we need to consider where does Copy start and stop.
    Lets first look at after the content … if i look at a single post i see the posts end with a Blue Box, Disclaimer, CovertKit form and Social Icons. Do you want to hook in after that or before that ?

    #2208872
    Tom

    I’d replace the blue box at the end with the text I want to insert. So, the last thing in the body of the post would be the text I want to insert.

    At the top, I’d want the text to be, in essence, the first sentence of the post.

    I’d like to be able to format the text, i.e. put it in a blue box and italicize.

    What I’m trying to do is automate placement of disclaimer text and a couple of other things in all posts.

    Thanks.

    #2208880
    David
    Staff
    Customer Support

    So how are the ConvertKit and Social Icons added to the page ? Is that automatic ?
    If it is can they be added using Hooks and Shortcodes ?

    #2208902
    Tom

    both via plugins.

    Convert Kit has it’ own. The social icons are from Grow Social Pro by Mediavine.

    #2208905
    David
    Staff
    Customer Support

    Do those plugins have an option to insert using a shortcode ?
    As ( i assume ) they are currently using the_content filter hook to insert their code, which makes it impossible to use an ( action ) hook to insert content before them.

    #2208919
    Tom

    I’ll have to check with ConvertKit. It seems you can use their shortcode, according to the settings in their plugin, but seems to suggest using it in addition to the app inserting the form at the end.

    As for mediavine, don’t see it in their plugin. I will ask their support, too.

    So I understand, if we could do both via shortcode, then we could do the text insert?

    Thanks.

    #2208942
    David
    Staff
    Customer Support

    Thats correct, as then you could use a Hook to add your Blue Box text, followed by the ConvertKit Shortcode and then the Social Sharing shortcode 🙂

    For the top of the Post, we have a similar challenge.
    For example if you were to use the generate_after_entry_header hook you could place content after the Title/Post Meta.
    Anything below that is in the content so we would need to use a filter to insert content. Let me know.

    #2209304
    Tom

    Got an answer from convertkit. I can insert a shortcode to display the form.

    As a hook?

    Where do I put it?

    I want it to be the last thing at the bottom of posts.

    #2209309
    Tom

    generate_after_content seems to work.

    That’s how I’m doing it as of now.

    #2209316
    Tom

    Using the plugin settings, I’ve stopped showing the social share buttons at the bottom. Will that do the trick, at least for the bottom?

    #2209344
    Ying
    Staff
    Customer Support

    Hi Tom,

    I want it to be the last thing at the bottom of posts.

    Givegenerate_before_comments_container hook a try.

    #2209475
    Tom

    Both generate_before_comments_header and generate_after_content seem to put the form in the same place. Is there any benefit to one or the other as far as inserting the text I want?

    #2209514
    Ying
    Staff
    Customer Support

    generate_before_comments_container

    This hook should insert the content after the social share icon. Isn’t that what you want?

    Let me know if I miss anything.

    #2209524
    Tom

    Ok. The Convertkit form is in the right place.

    Now I want to place this copy

    Some posts on this site contain affiliate links, meaning if you buy something through one of those links, Travel Past 50 may earn a small commission.

    above that, in the same format as the normal copy. How do I make it the same width? If I put it in like this, it displays full container width.

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