WordPress.org

Ready to get started?Download WordPress

Forums

new timestamp for every post? (2 posts)

  1. sepp88
    Member
    Posted 3 years ago #

    hey guys,
    i'm confused!

    function test($content) {
    
    	$timestamp = time();
    	echo $timestamp;
    	return $content;
    }
    
    add_filter('the_content', 'test');

    I thought this will echo a new $timestamp for every post on my frontpage. However every post has the same timestamp.

    What am i misunderstanding here? Is there a chance to get what i want and have a new timestamp ID for every post?

    thank you.

    edit: or is it simply possible to echo out each post's ID with my plugin. That would be unique enough. I just need a printed unique identifier for every post.

  2. Mordacity
    Member
    Posted 3 years ago #

    echo time()

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.