Tag Info

Hot answers tagged

1

Use the following code in the functions.php file at your theme's folder function my_enqueue($hook) { if ( 'edit.php' == $hook ) { return; } wp_register_script( 'xxx', get_template_directory_uri() . '/includes/js/slider.js', array( 'jquery' ) ); wp_enqueue_script( 'xxx' ); } add_action( ...


1

If you're just going to output your own data, there's no reason to wait for the main query to run. Hook parse_request and check if your page was requested and run your code there. function wpd_maybe_output_feed( $request ){ if( isset( $request->query_vars['pagename'] ) && 'gmailrss' == $request->query_vars['pagename'] ){ ...



Only top voted, non community-wiki answers of a minimum length are eligible