WordPress Growth Stack Trade is a query and reply website for WordPress builders and directors. It solely takes a minute to enroll.
Anyone can ask a query
Anyone can reply
The very best solutions are voted up and rise to the highest
Requested
Seen
5 occasions
I’m attempting to examine if there’s a shortcode contact kind 7 inside a web page however that isn’t working as normal because the web page is constructed with elementor
Operate has_shortcode
I’ve tried this answer however It doesn’t work additionally
if ( outlined( 'ELEMENTOR_PRO_VERSION' ) || outlined( 'ELEMENTOR_VERSION' ) ) {
$knowledge = get_post_meta( $post->ID, '_elementor_data', true );
if ( !empty( $knowledge ) && has_shortcode( $knowledge, $shortcode ) ) {
return true;
}
}
Thanks upfront
2
default