On my site have a custom post type with this info. I stored the file in single-{customposttype}.php.
<?php
get_header();
?>
<div style="width:500px;">
<?php
$id = get_the_id();
echo do_shortcode( '[skwidget id="' . $id . '"]' );
?>
</div>
<?php get_footer(); ?>
The skwidget plugin is called correctly and everything seems to work fine.
But here's the issue: Everything gets included but I ONLY want the css for the theme, css for the plugin and all relevant css/js for the plugin but I don't want header and footer-menu(s) to be shown. How do I achieve that?
If just remove get_header() and get_footer() then the plugin won't work because it needs js/css etc.
I GUESS I could create header html and footer manually but that doesn't seem like a good idea...
get_header()
call. You can includewp_dequeue_script()
andwp_dequeue_style()
for all the unnecessary scripts and styles. References: codex.wordpress.org/Function_Reference/wp_dequeue_script codex.wordpress.org/Function_Reference/wp_dequeue_stylewp_enqueue_script()
andwp_enqueue_style()
functions for necessary scripts and styles and get your thing working.