Question about dynamic data, functions, shortcodes #36
Replies: 1 comment
-
You should be able to use that in a Code Block element to get the current category and then retrieve the subcategories.
It's not possible to reuse values. You'd likely need to retrieve them in each function or shortcode.
I would expect you to be able to use this in a Code Block element or with Dynamic Data > PHP Function Return Value.
You would need to use a Code Block element with the WordPress do_shortcode() function. |
Beta Was this translation helpful? Give feedback.
-
I am trying out Oxygen for my wordpress website.
However current templates are heavily modified.
i have several wordpress functions i want to use like:
get_queried_object()
to grab the current category and display a subcategory listI see i can get values from ACF, but can i also reuse these values in other functions/shortcodes?
Custom functions such as
top10_category($list);
where top_10category is a custom function in a custom plugin, and $list is a return from a function getting all categories.Also i have shortcodes which work with eg the postid
[shortcode postid=$post_id]
I cannot figure out how to get the postid in there, or as mentioned above an ACF field.I am wondering if I can actually do above, or is it not possible for Oxygen. And if possible, is there a tutorial on how i can implement?
Beta Was this translation helpful? Give feedback.
All reactions