View WordPress Get Custom Field
<?php echo get_post_meta($post->ID, 'year', true); ?>
View WordPress query_posts
<?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(); ?>
View WordPress Get Category name By label
<?php
$idObj = get_category_by_slug('s_about');
$id = $idObj->term_id;
echo get_cat_name($id);
?>
View background responsive
background-color: transparent;
background-image: url(img/1.jpg);
background-size: cover;
background-position: center center;
background-repeat: no-repeat;
height: 100vh;
position: relative;
View functions.php
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');
View parallax-translate3d.js
$(window).scroll(function() {
var st = $(this).scrollTop() /10;
$(".object").css({
"transform" : "translate3d(0px, " + st + "%, .01px)",
"-webkit-transform" : "translate3d(0px, " + st + "%, .01px)"
});
});
View jQyery Form Ajax
//Аякс отправка форм
//Документация: http://api.jquery.com/jquery.ajax/
$("#form, #form2").submit(function(e) {
e.preventDefault;
$.ajax({
type: "POST",
url: "mail.php",
data: $(this).serialize()
}).done(function() {
alert("Спасибо за заявку!");
View scrolling
::-webkit-scrollbar-button {
background-image:url('');
background-repeat:no-repeat;
width:5px;
height:0px
}
::-webkit-scrollbar-track {
background-color:#ecedee
}
View Menu_mini_js
$(".left_sidebar_list").after("<div id='mobile-menu-sb'>").clone().appendTo("#mobile-menu-sb");
$("#mobile-menu-sb").find("*").attr("style", "");
$("#mobile-menu-sb").children("ul").removeClass("header_mnu_list")
.parent().mmenu({
// slidingSubmenus: true,
extensions : [ 'widescreen', 'effect-menu-slide' ],
navbar: {
title: "Продукция"
}
});
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>uniMail</title>
</head>
<body>
<form>