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 | |
$custom_fields = get_post_custom($post->ID); | |
foreach ( $custom_fields as $field_key => $field_values ) { | |
if(!isset($field_values[0])) continue; | |
if(in_array($field_key,array("_edit_lock", "_edit_last", "_thumbnail_id"))) continue; | |
echo "<strong>$field_key:</strong> $field_values[0] <br>"; | |
} |
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
show_admin_bar(false); | |
add_theme_support('post-thumbnails'); | |
remove_action( 'wp_head', 'feed_links_extra', 3 ); | |
remove_action( 'wp_head', 'feed_links', 2 ); | |
remove_action( 'wp_head', 'rsd_link' ); | |
remove_action('wp_head', 'wlwmanifest_link'); | |
remove_action('wp_head', 'wp_generator'); |
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
<style> | |
/* ---------------------------------------------- /* | |
* Mouse animate icon | |
/* ---------------------------------------------- */ | |
.mouse-icon { | |
border: 2px solid #000; | |
border-radius: 16px; | |
height: 40px; | |
width: 24px; | |
display: block; |
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 $url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large' ); $url = $url['0']; ?> |
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=1'); | |
while (have_posts()) : the_post(); ?> | |
<?php the_title(); ?> | |
<?php the_content(); ?> | |
<?php the_post_thumbnail(array(100, 100)); ?> | |
<? 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
#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
//Animate CSS + WayPoints javaScript Plugin | |
//Example: $(".element").animated("zoomInUp", "zoomOutDown"); | |
//Author URL: http://webdesign-master.ru | |
(function($) { | |
$.fn.animated = function(inEffect, outEffect) { | |
$(this).css("opacity", "0").addClass("animated").waypoint(function(dir) { | |
if (dir === "down") { | |
$(this).removeClass(outEffect).addClass(inEffect).css("opacity", "1"); | |
} else { | |
$(this).removeClass(inEffect).addClass(outEffect).css("opacity", "1"); |
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 | |
$idObj = get_category_by_slug('Имя Категории'); | |
$id = $idObj->term_id; | |
if ( have_posts() ) : query_posts('cat=' . $id); | |
while (have_posts()) : the_post(); ?> | |
<?php echo get_post_meta($post->ID, 'Имя доп поля', true); ?> | |
<? 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
<!-- Луп из поста по ID --> | |
<?php | |
$post_id_1 = get_post( 1 ); | |
$title = $post_id_1->post_title; | |
$content = $post_id_1->post_content; | |
$excerpt = $post_id_1->post_excerpt; | |
if (has_post_thumbnail( $post->ID ) ): | |
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); | |
?> | |
OlderNewer