Customizing Custom Post Page

I am trying to grab the current post PublishedDate, and hashtags and apply them to the text of a UI Text element. Here is my code.

import wixData from ‘wix-data’ ;
import wixLocation from ‘wix-location’ ;

$w( ‘#post1’ ).getPost()
.then( (post) => {
let postTitle = post.title;
let postContent = post.plainContent;
let postImage = post.coverImage;
let postExcerpt = post.excerpt;
let postDate = post.publishedDate;
$w( “#columnStrip8” ).background.src = postImage
$w( “#text10” ).text = postTitle
$w( “#text11” ).text = postDate
// see example post object below
} )
. catch ( (error) => {
} );

Everything works, except the postDate, and if I try to recall post.hashtags. The cover image updates, excerpt shows up, and the title works fine.
Any suggestions?

In order to set #text11, you need to convert postDate to a string:

$w("#text11").text = postDate.toString();

Hashtags are returned as an array of strings, so you will first have to format the hashtags as a string.

Thanks. I did get this working finally, however, when you click another article, it loads the default information into the UI Elements. It will not load them correctly unless you refresh the page. Any idea why?

@robertbarker2008 How and where are you displaying the articles? On another page? Can you share your code?