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
/*----------- Print Stylesheet -------------*/ | |
/* ===================================== | |
Print Stylesheet and script from | |
my theme folder to Admin Panel | |
=======================================*/ | |
add_action("admin_init", "custom_post_assets"); | |
function custom_post_assets() { | |
global $post_type; |
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
/* =============================================== | |
--------- Custom Login Screen -------------- | |
================================================== */ | |
add_action("login_head", "sepiaLogin"); | |
function sepiaLogin() { | |
project_admin_css(); | |
} | |
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 | |
if (is_archive() || is_category() || is_search() ) { | |
global $query_string; | |
parse_str( $query_string, $args ); | |
$args['post_type'] = array( 'ss-video', 'post' ); | |
query_posts( $args ); | |
} | |
?> |
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
/////////////////////////////////// | |
// Custom Post Type , Video | |
/////////////////////////////////// | |
// Custom Post - Project | |
function create_banner() { | |
// label for post type project. | |
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 if ( has_post_thumbnail()) : ?> | |
<span class="post-thumb"> | |
<a href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>" ><?php the_post_thumbnail('thumbnail'); ?></a> | |
</span> | |
<?php endif; ?> |
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
/* FEATURED THUMBNAILS */ | |
if ( function_exists( 'add_theme_support' ) ) { // Added in 2.9 | |
add_theme_support( 'post-thumbnails' ); | |
} | |
add_image_size('small-thumbnail', 80, 80, true); | |
/* =============================================== |
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
// Shortcode for recent post | |
add_shortcode('ss_recentpost','ss_recent_post'); | |
// add_filter('the_content', 'do_shortcode', 11); | |
add_filter('widget_text', 'do_shortcode'); | |
function ss_recent_post($attr) { |
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
/* GET THUMBNAIL URL */ | |
function get_image_url(){ | |
$image_id = get_post_thumbnail_id(); | |
$image_url = wp_get_attachment_image_src($image_id,'large'); | |
$image_url = $image_url[0]; | |
echo $image_url; | |
} |
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
// Enqueue Styles | |
function load_styles() { | |
wp_enqueue_style('AD-Gallery', $this->plugin_url . 'css/ad-gallery.css', false, '', 'screen'); | |
wp_enqueue_style('jScrollPane', $this->plugin_url . 'css/jScrollPane.css', false, '', 'screen'); | |
} | |
// Enqueue Scripts | |
function load_scripts() { |