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) => {
console.log(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?
Thanks