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
<?php | |
/** | |
* template name: blogupdate | |
* Created by PhpStorm. | |
* User: PC35 | |
* Date: 25-10-2016 | |
* Time: 16:04 | |
*/ | |
global $wpdb; | |
$id= get_current_user_id(); |
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 | |
/* | |
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
<?php | |
/** | |
* Template Name: Delete | |
* Created by PhpStorm. | |
* User: PC35 | |
* Date: 30-12-2016 | |
* Time: 18:21 | |
*/ | |
global $wpdb; | |
if(isset($_POST['delete_row'])) |
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
//Add this pice of code to functions.php | |
<?php | |
require_once('wp_bootstrap_pagination.php'); | |
function customize_wp_bootstrap_pagination($args) { | |
$args['previous_string'] = 'previous';//customize according to your class | |
$args['next_string'] = 'next';//customize according to your class | |
return $args; |
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
<?php | |
include('walker.php'); | |
function create_menu(){ | |
register_nav_menu('primary','Main-Menu'); | |
register_nav_menu('secondary','Footer Menu'); | |
} | |
add_action('init','create_menu'); | |
?> | |
?> |
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' ); |
OlderNewer