Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
using bricks builder. everything is up to date. i have not been able to pinpoint which page triggers this. is there an efficient way to do this, or rather, what is the way of figuring that out? thanks
i understand. will implement the second method! as for the forms version, i found this: // hijack the download shortcode add_shortcode( 'dlm_gf_form', array( $this, 'shortcode_dlm_gf_form' ) ); perhaps similar way to insert post meta into form version of shortcode?
i dug around the addon code and think found a similar callback for the shortcode id para, but not quite sure what i'm missing: function download_shortcode_custom_form_id($id, $atts = []){ if(!is_numeric($form_id) && $form_id = 'auto' ): //change 'temp' post meta name with your own $post_meta = get_post_meta(get_queried_object_id(), 'ur-download-form-id', true); $post_meta ? $form_id = $post_meta : null; endif; return $form_id; } add_filter('dlm_gf_form', 'download_shortcode_custom_form_id', 10, 2);
i have several post metas that are numeric IDs hence must use first method? i'm also using an addon for download monitor - gravity forms lock link. for that, the shortcode, which i must include in the same post is like this: [dlm_gf_form download_id="ur-single-download-form-id"] where ur-single-download-form-id would represent the post meta name.