Skip to content

Instantly share code, notes, and snippets.

@mmh4560
mmh4560 / slider-with-meta..php
Last active September 4, 2017 04:50
metabox, shortcode
<?php // Slider Shortcode
function inds_owl_slider() {
register_post_type( 'inds-slider', array(
'labels' => array(
'name' => 'Sliders',
'add_new' => 'Add New Slider',
'add_new_item' => 'Add New Slider',
'edit_item' => 'Edit Slider',
),
@mmh4560
mmh4560 / codestar-metabox.php
Created August 30, 2017 05:53
Practise codestarframework
<?php
require_once( get_template_directory() . '/inc/cs-framwork/cs-framework.php');
function indst_tm_opt_mtbx($options){
$options = array();
$options[] = array(
'id' => 'indst_tm_slide_meta',
'title' => 'Slider Options',
'post_type' => 'inds-slider',
@mmh4560
mmh4560 / WP_query and shortcode
Created August 11, 2017 16:07
Practise advace shortcode and WP_query funtions.
<?php
/*
Shortcode practise
*/
function query_shortcode($attr, $content = null) {
extract( shortcode_atts( array(
'type' => 'post',
'count' => 3,