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 | |
add_action( 'init', 'my_theme_custom_post' ); | |
function my_theme_custom_post() { | |
register_post_type( 'agent', | |
array( | |
'labels' => array( | |
'name' => __( 'Agents' ), |
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 | |
function stock_styled_map_shortcode($atts, $content = null) { | |
extract( shortcode_atts( array( | |
'lat' => '40.7433379', | |
'lng' => '-74.0103219', | |
'title' => esc_html('Head Office', 'stock-toolkit'), | |
'desc' => esc_html('House 21, Grand St. New York, USA', 'stock-toolkit'), | |
'height' => '500', | |
), $atts) ); |
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
## table of contents: | |
===================== | |
1. Basic Php | |
2. Install WordPress in live server | |
2.1. WordPress Dashboard Introduction | |
3. Introduce about IDE & WordPress template hierarchy | |
4. Introducing about Visual Composer | |
4.1. Visual Composer academy site | |
4.2. Use Visual Composer Element/Addons |
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 | |
trait Greetings | |
{ | |
public function sayHello() | |
{ | |
return 'Hello Bro'; | |
} | |
public function goodBye() |
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 Add to Cart | |
* | |
* This template can be overridden by copying it to yourtheme/woocommerce/loop/add-to-cart.php. | |
* | |
* HOWEVER, on occasion WooCommerce will need to update template files and you | |
* (the theme developer) will need to copy the new files to your theme to | |
* maintain compatibility. We try to do this as little as possible, but it does | |
* happen. When this occurs the version of the template file will be bumped and |
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 | |
$get_featured_cats = array( | |
'taxonomy' => 'product_cat', | |
'orderby' => 'name', | |
'hide_empty' => '0', | |
'include' => $cat_array | |
); | |
$all_categories = get_categories( $get_featured_cats ); | |
$j = 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
http://wordpress.stackexchange.com/questions/192451/dynamic-bootstrap-tabs-with-post-title-doesnt-display-the-content?lq=1 | |
<div id="tab"> | |
<ul class="nav nav-tabs" role="tablist"> | |
<?php $loop = new WP_Query( array( 'post_type' => 'candidates', 'posts_per_page' => -1 ) ); ?> | |
<?php | |
$counter = 0; | |
while ( $loop->have_posts() ) : $loop->the_post(); | |
$counter++; | |
?> | |
<li role="presentation" class="post-<?php the_ID(); ?> <?=($counter == 1) ? 'active' : ''?>"><a href="#post-<?php the_ID(); ?>" aria-controls="home" role="tab" data-toggle="tab"><?php the_title();?></a></li> |
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
// Edit order items table template defaults | |
function sww_add_wc_order_email_images( $table, $order ) { | |
ob_start(); | |
$template = $plain_text ? 'emails/plain/email-order-items.php' : 'emails/email-order-items.php'; | |
wc_get_template( $template, array( | |
'order' => $order, | |
'items' => $order->get_items(), | |
'show_download_links' => $show_download_links, |
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 | |
function dwwp_register_post_type() { | |
$args = array('public'=> true, 'label'=> 'Staff'); | |
register_post_type( 'staff', $args); | |
} | |
add_action( 'init', 'dwwp_register_post_type' ); |
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
Root url for website | |
--------------------------------------------------------- | |
<?php site_url(); ?> | |
<?php bloginfo('url'); ?> | |
title of specific post/page | |
--------------------------------------------------------- | |
<?php wp_title(); ?> | |
Title of site |
NewerOlder