This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<style> | |
body { margin: 0; } | |
.vimeo-container { | |
padding: 0; | |
width: 100%; | |
height: 100vh; | |
overflow: hidden; | |
position: relative; | |
} | |
iframe { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
$return = array( | |
'var1' => 4, | |
'error' => $error, | |
); | |
wp_send_json($return); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Stop WordPress from adding those annoying paragraph tags */ | |
remove_filter( 'the_content', 'wpautop' ); | |
remove_filter( 'the_excerpt', 'wpautop' ); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_shortcode( 'MY_SHORTCODE', 'my_shortcode' ); | |
function my_shortcode( $attr ) { | |
$contents = ''; | |
ob_start(); | |
require_once('myfolder/show.php'); | |
$contents = ob_get_contents(); | |
ob_end_clean(); | |
return '[raw]'.$contents.'[/raw]'; | |
// Raw could be usefull to disable wordpress formatting (add <p>) | |
// Voir http://www.catswhocode.com/blog/10-incredibly-cool-wordpress-shortcodes => POINT 9 |