[resolved] How can I display the Post Date in specific post titles? (4 posts)

  1. netflow
    Posted 5 years ago #

    What I want to do is to have <?php the_time() ?> in the actual post title outside of the loop. I don't want this to be used on all posts, only those in a certain category so I don't want to insert that into the template but into the actual title of the post.

    I am using php-exec and that allows me to load php code in the excerpt and in the body of posts but for whatever reason it doesn't allow the same to be run from the title of post.

    This is the last piece of a huge puzzle i've solved for one of my blogs so I would really REALLY appreciate any ideas or solutions you can throw forward.

    Thanks in advance!

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    All code and tags are stripped from the post title by WordPress.

  3. netflow
    Posted 5 years ago #

    Yes well, it was easy enough to stop wordpress from stripping the tags but the php still isn't being executed in the title. When I look at the html for the page I can see <?php the_time() ?> clear as day in the title but it's not being executed. So I want to find out why that is and how to change that

  4. netflow
    Posted 5 years ago #

Topic Closed

This topic has been closed to new replies.

About this Topic