1

I'm using Omega for theming and I want to show created date time in teaser Article.

I found this <?php print format_date($node->changed, 'article') ?>

But I don't know where to put it.

Any Help?

1

To print date add this <?php print date('d M Y', $node->created); ?>

The output of this will be something like: 12 Dec 2014.

You can change 'd M Y' part for different output, take a look at date() function.

|improve this answer|||||
  • thank you, but where should i add this ? – user23811 Jul 12 '15 at 12:43
  • in your tpl.php file of that node (content type) – mixerowsky Jul 12 '15 at 13:18
  • i will let you know what happend – user23811 Jul 12 '15 at 13:25
  • sure, also take a look at this: drupal.org/node/17565 – mixerowsky Jul 12 '15 at 13:51
0

I assume content is created using Article Type.

Just go to

Home » Administration » Structure » Content types » Article » Manage display

Click on Teaser Button on right side.

You see list of fields available for display / hide. Choose accordingly.

You are done.

|improve this answer|||||
0

I think is doable via UI, if you go to content type -> edit should be an option for show that and then if you go to manage display just enable it.

The other way you mean is editing the tpl.php file on your theme and add: $node->created

for this last way I highly recommend you read the documentation

|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy