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 | |
// Define custom post type string | |
define( 'CUSTOM_POST_TYPE', 'affiliates' ); | |
/** | |
* Register the meta box | |
*/ | |
if ( !function_exists( 'page_templates_dropdown_metabox' ) ) { |
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
select { | |
-webkit-appearance: none; | |
-moz-appearance: none; | |
appearance: none; | |
background: url('./images/angle-arrow-down.svg') 98% / 15% no-repeat; | |
background-size: 9px; | |
border: 0; | |
border-bottom: 1px solid #e1e1e1; | |
border-radius: 0; |
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 | |
/* | |
* Get content by page ID | |
*/ | |
function marvy_the_content_by_id( $id ) { | |
if ( isset( $id ) && 0 != $id ) { | |
global $post; | |
$post = get_post( $id ); | |
setup_postdata( $post ); |
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 | |
// Xprofile get fileds by group | |
if ( bp_has_profile( array( 'user_id' => $user_id ) ) ) { | |
while ( bp_profile_groups() ) : bp_the_profile_group(); | |
$group_name = bp_get_the_profile_group_name(); | |
if ( ( 'Social' == $group_name) && bp_profile_group_has_fields() ) { | |
echo '<div id="bb-profile-group-fields">'; | |
while ( bp_profile_fields() ) : bp_the_profile_field(); |
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
.clearfix:before, | |
.clearfix:after { | |
flex-basis: 0; | |
order: 1; | |
} |
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 | |
// Add class to body in admin section | |
function admin_body_classes($classes) { | |
$classes .= 'no-adminbar'; | |
return $classes; | |
} | |
add_filter( 'admin_body_class', 'admin_body_classes' ); |
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 | |
/* ! | |
* Function to trim excerpt | |
*/ | |
if ( !function_exists( 'limit_excerpt' ) ) { | |
function limit_excerpt( $lenght, $text ) { | |
$content = substr( $text, 0, $lenght ); | |
if ( strlen( $content ) < strlen( $text ) ) { |
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
.img-parent img { | |
position: relative; | |
overflow: hidden; | |
padding-bottom: 69.44%; /* Calculated = height / width * 100 */ | |
display: block; | |
} | |
.img-parent img { | |
position: absolute; | |
top: 0; |