This file contains 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 | |
/** | |
* Create a metabox with multiple fields. | |
* Replace `_namespace` with some namespace for your project to avoid conflicts with other items | |
*/ | |
// | |
// Create Metabox | |
// |
This file contains 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
/* | |
This .scss loop will create "margin helpers" and "padding helpers" for use in your web projects. | |
It will generate several classes such as: | |
.m-r-10 which gives margin-right 10 pixels. | |
.m-r-15 gives MARGIN to the RIGHT 15 pixels. | |
.m-t-15 gives MARGIN to the TOP 15 pixels and so on. | |
.p-b-5 gives PADDING to the BOTTOM of 5 pixels | |
.p-l-40 gives PADDING to the LEFT of 40 pixels |
This file contains 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 | |
//====================================================================== | |
// Add post state to the projects page | |
//====================================================================== | |
add_filter( 'display_post_states', 'ecs_add_post_state', 10, 2 ); | |
function ecs_add_post_state( $post_states, $post ) { |
This file contains 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
<script type="text/html" id="tmpl-my-frame"> | |
<div class="media-frame-title"> | |
<h1>My Frame</h1> | |
</div> | |
<div class="media-frame-content"></div> | |
<div class="media-frame-toolbar"> | |
<div class="media-toolbar"> | |
<div class="media-toolbar-secondary"></div> | |
<div class="media-toolbar-primary search-form"> | |
<button type="button" class="button button-primary media-button button-large">My Button</button> |
This file contains 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
// Shortcode | |
// source : https://wpbakery.atlassian.net/wiki/pages/viewpage.action?pageId=524362 | |
if(!function_exists('carousel_content')){ | |
function carousel_content( $atts, $content = null ) { | |
return '<div class="owl-carousel content-carousel content-slider">'.do_shortcode($content).'</div>'; | |
} | |
add_shortcode('carousel_content', 'carousel_content'); | |
} |