[resolved] dynamically copy the_title into the_content in a post (4 posts)

  1. piasmith
    Posted 4 years ago #

    First of all thank you to all you guys answering all these questions.

    I am trying to do the following in a post.

    <add img>
    <add iframe>
         <?php the_title(); ?>    <-this is what I am trying to do
    <add another img>
    <then some text> ....

    I don't know enough about php at this point to know why it doesn't work, but is there a way to make it work?

    Just to be clear I do not want to move it, I just want it to also appear dynamically in the_content.

    Thank you,

    [Please post code snippets between backticks or use the code button.]

  2. chadrew
    Posted 4 years ago #

    Normally you can't use PHP in WordPress posts.

    I suppose you could use this plugin:


  3. Michael
    Forum Moderator
    Posted 4 years ago #

    shortcode might be another option


  4. piasmith
    Posted 4 years ago #

    Thank you Chadrew. The plug-in seemed to work but the when I added something or edited. The php became text. I changed the class of entry div on the index page, I don't know if there is a reference to that and that way why it didn't work on the index page but did work on the single page. And as there was a million or so different files that could be hidden in I decided to do something else for now.

    Thank you alchymyth. I might try out the short code down the road.

Topic Closed

This topic has been closed to new replies.

About this Topic