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 $image = get_sub_field('NAMEOFYOURSUBIMAGEFIELD'); ?> | |
<?php if( $image ): ?> | |
<img src="<?php echo $image['sizes']['YOURCUSTOMSIZE']; ?>" width="<?php echo $image['sizes']['YOURCUSTOMSIZE-width']; ?>" height="<?php echo $image['sizes']['YOURCUSTOMSIZE-height']; ?>" alt="<?php echo $image['alt']; ?>" /> | |
<?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
<p class="image_photographer">Image courtesy of: <a href="<?php the_field('photographer_url')?>"> <?php the_field('image_photographer') ?> </a></p> |
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( get_field('field_name') ): ?> | |
<p>My field value: <?php the_field('field_name'); ?></p> | |
<?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
width="<?php echo $image['sizes']['medium-width']; ?>" height="<?php echo $image['sizes']['medium-height']; ?>" | |
<?php the_post_thumbnail('thumbnail'); ?> | |
the_post_thumbnail(); // without parameter -> Thumbnail | |
the_post_thumbnail('thumbnail'); // Thumbnail | |
the_post_thumbnail('medium'); // Medium resolution | |
the_post_thumbnail('large'); // Large resolution |
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 ( have_posts() ) : query_posts('p=64'); | |
while ( have_posts() ) : the_post(); ?> | |
<?php | |
$src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), false, '' ); | |
?> | |
<? endwhile; endif; wp_reset_query(); ?> |
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 | |
/* | |
Plugin Name: Set Post Order In Admin | |
Version: 0.1 | |
Plugin URI: http://wordpress.org/support/topic/336715/ | |
Description: In Posts->Edit, display posts in title order. | |
Author: MichaelH | |
Author URI: http://codex.wordpress.org/User:MichaelH/MyPlugins | |
*/ |
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 query_posts('category_name=Portfolio&order=ASC&orderby=date&posts_per_page=36'); ?> | |
<?php if (have_posts()) : ?> | |
<?php while (have_posts()) : the_post(); ?> | |
<?php | |
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail' ); | |
$url = $thumb['0']; | |
?> | |
<li><a style="background-image:url(<?=$url?>);" href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"></a></li> |
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
<div style="display: table; height: 400px; overflow: hidden;"> | |
<div style="display: table-cell; vertical-align: middle;"> | |
<div> | |
everything is vertically centered in modern IE8+ and others. | |
</div> | |
</div> | |
</div> |
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
#loader { | |
background: none repeat scroll 0 0 #ffffff; | |
bottom: 0; | |
height: 100%; | |
left: 0; | |
position: fixed; | |
right: 0; | |
top: 0; | |
width: 100%; | |
z-index: 9999; |
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
/* Small Devices, Tablets */ | |
@media only screen and (max-width : 768px) { | |
.animated { | |
/*CSS transitions*/ | |
-o-transition-property: none !important; | |
-moz-transition-property: none !important; | |
-ms-transition-property: none !important; | |
-webkit-transition-property: none !important; | |
transition-property: none !important; | |
/*CSS transforms*/ |
OlderNewer