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 | |
/** | |
* Template Name: Test | |
* Created by PhpStorm. | |
* User: PC35 | |
* Date: 23-12-2016 | |
* Time: 10:32 | |
*/ | |
?> | |
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
Abbreviation: cpt | |
Description: custom post type | |
<?php | |
/** | |
* Register Post Type $cpt$ | |
*/ | |
add_action( 'init', 'codex_$cpt$_init' ); | |
function codex_$cpt$_init() { |
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 | |
$terms = get_terms( array( | |
'taxonomy' => 'taxonomy_name', | |
'hide_empty' => false, | |
) ); | |
//from the above code you will get the term id; | |
$args = array( | |
'post_type' => 'product', |
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
<html> | |
<head> | |
<title>Insert data in the database using Ajax</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script> | |
<style>/* Absolute Center Spinner */ | |
.success{ | |
color:green; | |
font-size:20px; | |
border:1px solid green; | |
padding: 8px; |
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 class="carousel-inner" role="listbox"> | |
<?php | |
$c = 0; | |
$class = ''; | |
query_posts('category_name=slider&showposts=3'); | |
if ( have_posts() ) : while ( have_posts() ) : the_post(); | |
$c++; | |
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'thumbnail' ); |
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: CV | |
Plugin URI: http://Gowebbi.com/ | |
Description: CV | |
Author: | |
Version: 1.0 | |
Author URI: http://Gowebbi.com/ | |
*/ | |
add_action('admin_menu', 'wp_show_summery'); |
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
JSON IS NOTHING BUT AN ARRAY OF OBJECTS. | |
OBJECT: | |
var myCar = { | |
"name": "Audi", | |
"model": "AU-300", | |
"color": "Red" | |
} | |
var myColor = { |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>json and ajax</title> | |
<style type="text/css"> | |
.hide-me{ | |
display: none; | |
} | |
</style> | |
</head> |
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 $loop = new WP_Query(array('post_type' => 'portfolio', 'posts_per_page' => get_option('to_count_portfolio'), 'paged' => get_query_var('paged') ? get_query_var('paged') : 1 ) | |
); ?> | |
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?> | |
<span class="title"><?php the_title(); ?></span></br> | |
<?php endwhile; ?> | |
<?php | |
$big = 999999999; // need an unlikely integer | |
echo paginate_links( array( |
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 | |
/* | |
Template Name: Car Search | |
*/ | |
error_reporting(0); | |
get_header('inner'); | |
if($_POST['btn_submit']) { | |
$service = $_POST['select1']; | |
$zipcode = $_POST['select3']; |
OlderNewer