Skip to content

Instantly share code, notes, and snippets.

View fyapy's full-sized avatar
🏠
Working from home

Amir Abdullin fyapy

🏠
Working from home
View GitHub Profile
<?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(); ?>
<?php echo get_template_directory_uri(); ?>/
<?php wp_head(); ?>
<?php wp_footer(); ?>
<?php bloginfo('name'); ?>
<?php bloginfo('description'); ?>
<?php wp_list_pages(array(
'title_li' => '',
'child_of' => $id,
'show_date' => 'modified',
'date_format' => $date_format
)); ?>
$(function(){
var a = new String;
a = $('.text_cont_inner').html();
var b = a.indexOf(' ');
if (b == -1) {
b = a.length;
}
$('.text_cont_inner').html('<span class="first_word">'+a.substring(0, b)+'</span>'+a.substring(b, a.length));
});
$("#form").submit(function() {
$.ajax({
type: "POST",
url: "mail.php",
data: $(this).serialize()
}).done(function() {
$(this).find("input").val("");
alert("Спасибо за заявку! Скоро мы с вами свяжемся.");
$("#form").trigger("reset");
});
<?php echo get_post_meta($post->ID, 'name', true); ?>
<?php single_cat_title(); ?>
<?php echo get_cat_name('id');?>
<?php echo category_description('id'); ?>