Archived topic
Shortcode not executed
3 replies · Started by Peter on March 3, 2020
Hi,
I am trying to execute a shortcode via a hook. Using this shortcode works fine via Elements > Header. However Using the same shortcode via Elements > Hook is not working.
Execute Shortcodes is enabled and I only see the shortcode itself on the page: {{custom_field.description}}.
Settings:
Inside_side_container
Execute shortcode
Priority 1
Any suggestions to get this running?
Hi there,
That is template tag (not shortcode) which doesn't work in hooks.
You will need to use the method David explained here:
https://generatepress.com/forums/topic/authorship-and-more-custom-fields-help/#post-978920
Hi Leo,
I used at the end this code, which is working perfectly well:
https://www.wpbeginner.com/wp-tutorials/how-to-display-category-descriptions-in-wordpress/
Peter
Glad you found a solution :)