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 | |
if ( has_post_thumbnail()) { | |
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); | |
echo '<a href="' . $large_image_url[0] . '" title="' . the_title_attribute('echo=0') . '" >'; | |
the_post_thumbnail('new-size'); | |
echo '</a>'; | |
} | |
?> |
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
// custom image size for slider | |
if ( function_exists( 'add_image_size' ) ) { | |
add_image_size( 'new-size', 900, 400, true ); //(add new size here) | |
} | |
add_filter('image_size_names_choose', 'my_image_sizes'); | |
function my_image_sizes($sizes) { | |
$addsizes = array( | |
"new-size" => __( "New Size") |
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
function custom_login_css() { | |
echo '<link rel="stylesheet" type="text/css" href="'.get_stylesheet_directory_uri().'/assets/css/app.css" />'; | |
} | |
add_action('login_head', 'custom_login_css'); |
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
function hideplugins() { | |
global $wp_list_table; | |
$hidearr = array('plugin-folder/plugin.php'); | |
$myplugins = $wp_list_table->items; | |
foreach ($myplugins as $key => $val) { | |
if (in_array($key,$hidearr)) { | |
unset($wp_list_table->items[$key]); | |
} | |
} | |
} |
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 | |
if ( has_post_thumbnail() ) { // check if the post has a Post Thumbnail assigned to it. | |
the_post_thumbnail(array(200,137)); // adjust to whatever size or empty | |
} | |
?> |
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 if( !is_front_page() ):?> | |
<div class="page-header"> | |
<h1><?php echo roots_title(); ?></h1> | |
</div> | |
<?php endif;?> |
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 if ( 'portfolio' == get_post_type() ) { ?> | |
portfolio | |
<?php } else { ?> | |
blog | |
<?php } ?> |