Skip to content

Instantly share code, notes, and snippets.

View ibrahimkholil's full-sized avatar
🎯
Focusing

Ibrahim khalil ibrahimkholil

🎯
Focusing
  • Orangetoolz
  • House 77 (9th Floor), Road 13, Sector 10, Uttara, Dhaka -1230
  • X @IKholil
View GitHub Profile
@ibrahimkholil
ibrahimkholil / Register post type
Created October 20, 2016 08:22
Register post type in wordlress
<?php
function corlate_theme_custom_post_type() {
$labels = array(
'name' => _x( 'Sliders', 'Post Type General Name', 'corlate' ),
'singular_name' => _x( 'Slider', 'Post Type Singular Name', 'corlate' ),
'menu_name' => __( 'Slider', 'corlate' ),
'name_admin_bar' => __( 'Slider', 'corlate' ),
'archives' => __( 'Item Archives', 'corlate' ),
@ibrahimkholil
ibrahimkholil / order function include in custom post type
Created October 21, 2016 19:11
order function include in custom post type
custom post order system:
1. support in custom post support = page-attributes
2. add it in post query $args = array( 'post_type' => 'promotion', 'posts_per_page' => 6,'orderby' =>'menu_order','order' =>'ASC' );
@ibrahimkholil
ibrahimkholil / Custom post query
Last active October 21, 2016 19:33
Custom post query
<?php
global $post;
$args = array( 'posts_per_page' => 6, 'post_type'=> 'protfolio' );
$protfolio = get_posts( $args );
foreach( $protfolio as $post ) : setup_postdata($post); ?>
<?php
$protfolio_link= get_post_meta($post->ID, 'protfolio_link', true);
?>
@ibrahimkholil
ibrahimkholil / Shortcodes
Created October 23, 2016 15:11
Shortcodes
<?php
function post_list_shortcode($atts){
extract( shortcode_atts( array(
'count' => '',
), $atts) );
$q = new WP_Query(
array('posts_per_page' => $count, 'post_type' => 'posttype', 'orderby' => 'menu_order','order' => 'ASC')
);
@ibrahimkholil
ibrahimkholil / Shortcode menu in post tinymce
Created October 23, 2016 16:02
Shortcode menu in post tinymce
http://www.wpexplorer.com/wordpress-tinymce-tweaks/
1. first setup this ex(tinymce.php):
<?php
// Hooks your functions into the correct filters
function corlatne_tinymce_button() {
// check user permissions
@ibrahimkholil
ibrahimkholil / sort_order.php
Created October 24, 2016 14:24
WordPress: Enabling Page attributes for posts (sort_order)
/**********************************************************
function.php add below the code
*************************************
function posts_order()
{
add_post_type_support( 'post', 'page-attributes' );
}**/
add_action( 'admin_init', 'posts_order' );
@ibrahimkholil
ibrahimkholil / related post by category in single below thepost
Created October 31, 2016 16:21
How to automatically insert a list of related articles below the post
/*********************************************************************************/
/*How to automatically insert a list of related articles below the post*/
/*********************************************************************************/
function wptuts_more_from_cat( $title = "More From This Category:" ) {
global $post;
// We should get the first category of the post
$categories = get_the_category( $post->ID );
$first_cat = $categories[0]->cat_ID;
// Let's start the $output by displaying the title and opening the <ul>
@ibrahimkholil
ibrahimkholil / search html form with tooltips
Created December 13, 2016 17:31
search html form with tooltips
<link rel='stylesheet' href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"/>
<link rel='stylesheet' href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"/>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<style>
fieldset {
float:right;
z-index: 99999;
border: 1px solid #e2e2e2;
@ibrahimkholil
ibrahimkholil / Title tag wordpress dynamically for theme forest supported
Last active January 2, 2017 10:56
Title tag wordpress dynamically for theme forest supported
<title><?php
/*
* Print the <title> tag based on what is being viewed.
*/
global $page, $paged;
wp_title( '|', true, 'right' );
// Add the blog name.
bloginfo( 'name' );
@ibrahimkholil
ibrahimkholil / চলুন জেনে নেই কিছু ওয়েব ডিজাইন ও ডেভেলপমেন্ট শেখার ওয়েবসাইটের লিংকঃ
Last active January 3, 2017 10:16
চলুন জেনে নেই কিছু ওয়েব ডিজাইন ও ডেভেলপমেন্ট শেখার ওয়েবসাইটের লিংকঃ
চলুন জেনে নেই কিছু ওয়েব ডিজাইন ও ডেভেলপমেন্ট শেখার ওয়েবসাইটের লিংকঃ
1. https://codex.wordpress.org/
2. http://wpbeginner.com/
3. http://wpsitecare.com/
4. https://learn.wordpress.com/
5. http://premium.wpmudev.org/blog/learn-wordpress-in-a-week/
6. https://siteground.com/
7. https://layerthemes.com/
8. https://wp101.com/