07-27-2023, 10:39 AM
In Timber is this function
{{post}}
where you get things like
{{post.post_title}}
but there are other functions in WordPress like
get_the_permalink();
which are not accessible from post.get_the_permalink or post.get_permalink
these are the variables i can access
- ID
- post_author
- post_date
- post_date_gmt
- post_content
- post_title
- post_excerpt
- post_status
- comment_status
- ping_status
- post_password
- post_name
- to_ping
- pinged
- post_modified
- post_modified_gmt
- post_content_filtered
- post_parent
- guid
- menu_order
- post_type
- post_mime_type
- comment_count
- filter
As this Timber documentation describes there are actions [\[Timber Doc\]][1] but you would have to define each function in the functions.php file ... which means i would have to create each already existing function from php and "redirect" it to the wordpress function. Then bind it to Twig.
Also there was a way as you can see [here][2] which is now [deprecated][3]
[1]:
{{post}}
where you get things like
{{post.post_title}}
but there are other functions in WordPress like
get_the_permalink();
which are not accessible from post.get_the_permalink or post.get_permalink
these are the variables i can access
- ID
- post_author
- post_date
- post_date_gmt
- post_content
- post_title
- post_excerpt
- post_status
- comment_status
- ping_status
- post_password
- post_name
- to_ping
- pinged
- post_modified
- post_modified_gmt
- post_content_filtered
- post_parent
- guid
- menu_order
- post_type
- post_mime_type
- comment_count
- filter
As this Timber documentation describes there are actions [\[Timber Doc\]][1] but you would have to define each function in the functions.php file ... which means i would have to create each already existing function from php and "redirect" it to the wordpress function. Then bind it to Twig.
Also there was a way as you can see [here][2] which is now [deprecated][3]
[1]:
[To see links please register here]
[2]:[To see links please register here]
[3]:[To see links please register here]