[Support request] How to add some html formated text to every new post in WordPress

Home Forums Support [Support request] How to add some html formated text to every new post in WordPress

Home Forums Support How to add some html formated text to every new post in WordPress

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1620139
    Ogi22

    I create posts in which similar text is repeated to me.
    Therefore, I would like to make my work easier, and therefore I want every new post to already contain this text.

    Example:
    Each posts contains the following headings, under which the text that is specific to each post will proceed.

    
    <h2> Keywords </h2>
    
    <h2> Similar articles </h2>
    

    Where should I insert the predefined text to be included in each new post?
    I’m looking for a solution for new posts, not new pages.
    But it would be interesting to see a solution for new pages as well.
    I use GeneratePress V 2.4.2

    ## My research
    I should probably edit the single.php file, but I didn’t find where to insert the text.

    https://wordpress.stackexchange.com/questions/381573/how-to-add-some-html-formated-text-to-every-new-post-in-wordpress

    #1620349
    David
    Staff
    Customer Support

    Hi there,

    not as simple as that – as the single.php does not alter the_content you can only add elements inside the template with that method.

    Creating block templates for your post is not that simple, really good guide on that here:

    https://www.billerickson.net/gutenberg-block-templates/

    Alternative is to create a new post with your headings etc. and use the Duplicate Posts plugin each time you need to create a new post.

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