• Is this possible?
    Instead of adding a small include into every last article I have, ultimately having to change it all if I ever change my mind, I am wondering if I can stick some sort of php include directly into the_content.. maybe after a specific amount of characters or more preferably, paragraphs?

    Maybe after the second paragraph of every last article, my little php include segment will be thrown in.

    Can I do this in functions or other?

    I do not want to edit each individual article to put the same exact line in.
    I just don’t want that one line to be at the end or beginning of my articles. Instead, in the midst of it all.

Viewing 1 replies (of 1 total)
  • You could probably do this using CSS, if what you want to add is fairly simple, i.e., contains no HTML tags:

    .hentry p:nth-child(2):after {
       content: 'Hello, world!';
       display: block;
       margin-top: 20px;
    }

    For something more complicated, you can add it using jQuery. Then you won’t have to touch the php.

    I’m kind of puzzled, though, when you say “every last article.” Exactly what do you mean by “last?” Can you post a link to your site?

Viewing 1 replies (of 1 total)
  • The topic ‘Add content into the_content?’ is closed to new replies.