I currently have a hook created that inserts my convert kit lead magnet at the bottom of all my blog posts. But I’d like to place it in the middle of my blog post. Say, after the 15th or 20th paragraph. I know how to do this with the “add inserter” plugin, but I’d like to accomplish this without activating another plugin. Is there a way to do this with a custom hook?
Just change prefix_insert_after_paragraph( $inserted_hook, 6, $content) to prefix_insert_after_paragraph( $inserted_hook, 20, $content ), and change [portable_hook hook_name="after_sixth_paragraph"] to [portable_hook hook_name="after_20th_paragraph"].
Don’t you have a hook ( you meant the block element - hook or hook element, right?) with the convert kit currently? If so, you just need to change the hook name to custom hook > after_20th_paragraph.