Skip to content

Instantly share code, notes, and snippets.

View Rayhanuc's full-sized avatar
🏠
Working from home

Md. Rayhan Uddin Chowdhury Rayhanuc

🏠
Working from home
View GitHub Profile
@Rayhanuc
Rayhanuc / metabox.config.php
Created March 1, 2018 10:10
Homework submitting
<?php if ( ! defined( 'ABSPATH' ) ) { die; } // Cannot access pages directly.
// ===============================================================================================
// -----------------------------------------------------------------------------------------------
// METABOX OPTIONS
// -----------------------------------------------------------------------------------------------
// ===============================================================================================
$options = array();
@Rayhanuc
Rayhanuc / rrf-Rayhanuc-practice-2.php
Created September 23, 2018 09:10
another shortcode test
//industry_rayhan_shortcode start
function industry_rayhan_shortcode($atts){
extract( shortcode_atts( array(
'count' => 2,
'type' => 'page',
), $atts) );
$arg = array(
'post_type' => $type,
'posts_per_page' => $count,
//industry_rayhan_slide_shortcode start
function industry_rayhan_slides_shortcode($atts){
extract( shortcode_atts( array(
'count' => 2,
'type' => 'page',
), $atts) );
$arg = array(
'post_type' => 'industry-slide',
'posts_per_page' => 3,
<?php
require get_template_directory() . '/inc/cs-framework/cs-framework.php';
function industry_rayhan_theme_metabox ($options) {
$options = array(); // remove old options
$options [] = array(
'id' => 'industry_rayhan_slide_meta',
//industry_rayhan_slide_shortcode start
function industry_rayhan_slides_shortcode($atts){
extract( shortcode_atts( array(
'count' => 2,
'type' => 'page',
), $atts) );
$arg = array(
'post_type' => 'industry-slide',
'posts_per_page' => 3,
@Rayhanuc
Rayhanuc / index.php
Created October 28, 2018 13:20
Getting ready for blog page
<?php
/**
* The main template file
*
* This is the most generic template file in a WordPress theme
* and one of the two required files for a theme (the other being style.css).
* It is used to display a page when nothing more specific matches a query.
* E.g., it puts together the home page when no home.php file exists.
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
<?php
/**
* Template part for displaying posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
*
* @package Industry_Rayhan
*/
?>
<header class="site-header">
<div class="header-top-area">
<div class="container">
<div class="row">
<div class="col-md-4">
<div class="site-branding">
<?php get_template_part('template-parts/headers/logo') ?>
</div><!-- .site-branding -->
</div><!-- col-md-4 end -->
<?php
/**
* This file represents an example of the code that themes would use to register
* the required plugins.
*
* It is expected that theme authors would copy and paste this code into their
* functions.php file, and amend to suit.
*
* @see http://tgmpluginactivation.com/configuration/ for detailed documentation.
*
<?php
//industry_project_shortcode start --4
function industry_project_shortcode($atts){
extract( shortcode_atts( array(
'theme' => '1',
), $atts) );
$project_categories = get_terms('project_cat');