do_shortcode(‘[jobpost]’) in the_content filter causes endless loading screen.
-
Hello there,
I need to use the shortcode [jobpost] in the content filter.
My code:`
function wpd_do_stuff_on_404($content){
global $wp;
$path_start = substr( parse_url(home_url( $wp->request ), PHP_URL_PATH), 1, 4 ) ;
$current_res_code = http_response_code ();
if( $path_start == ‘jobs’ ){
$content = ‘[jobpost]’;
}return $content;
}add_filter( ‘the_content’, ‘wpd_do_stuff_on_404’, 9 );
but this causes an endless loading screen. I tried it with a different shortcode from contact form 7 for example and it worked fine. I also tried it with do_shortcode(‘[jobpost]’) without any success.
Could you help me out here? Can I query jobs in some other way with location, type and category?
Thank you.
- The topic ‘do_shortcode(‘[jobpost]’) in the_content filter causes endless loading screen.’ is closed to new replies.