Skip to content

Instantly share code, notes, and snippets.

View ozamancse's full-sized avatar

Md. Ohiduzzaman Sumon ozamancse

View GitHub Profile
<?php
function tmf_remove_slug( $post_link, $post, $leavename ) {
if ( 'practice-area' != $post->post_type || 'publish' != $post->post_status ) {
return $post_link;
}
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );
<?php
function tmf_remove_slug( $post_link, $post, $leavename ) {
if ( 'practice-area' != $post->post_type || 'publish' != $post->post_status ) {
return $post_link;
}
$post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );
(function ($) {
"use strict";
jQuery(document).ready(function ($) {
function adjustIframes() {
$('iframe').each(function() {
var $this = $(this),
//Use If else Condition
<ul>
<?php if (get_adjacent_post(false, '', true)): // if there are older posts ?>
<li class="prev"><?php previous_post_link('%link', '« Previous post', TRUE); ?></li>
<?php endif; ?>
<?php if (get_adjacent_post(false, '', false)): // if there are newer posts ?>
<li class="next"><?php next_post_link('%link', 'Next post »', TRUE); ?></li>
<?php endif; ?>
</ul>
#A File Icon
#AdvacedNewFile
#Agila Theme
#All Autocomplete
#AutoFileName
#BracketHighlighter
#Emmet
#Jquery
1# Active Unyson Without plugin
<?php
include_once ('framework/bootstrap.php');
?>
2# Diable Unyson Others Extensions
\framework\core\components\extensions\manager(available-extensions.php)
<?php if ( ! defined( 'FW' ) ) {
die( 'Forbidden' );
}
@ozamancse
ozamancse / custom-post-loop-with-pagination.php
Created May 29, 2016 12:08
Custom post loop with pagination
<?php
global $paged;
$posts_per_page = 9;
$settings = array(
'showposts' => $posts_per_page,
'post_type' => 'portfolio',
'orderby' => 'menu_order',
'order' => 'ASC',
'paged' => $paged)
);
@ozamancse
ozamancse / shortcode-custom-post-with-pagination.php
Last active March 21, 2018 08:15
Shortcode custom post loop with pagination in
<?php
function portfolios_shortcode($atts){
extract( shortcode_atts( array(
'expand' => '',
), $atts) );
global $paged;
$posts_per_page = 6;
$settings = array(
@ozamancse
ozamancse / category-function.php
Created May 29, 2016 12:03
Add Category Function
function my_theme_custom_post_taxonomy() {
register_taxonomy(
'myname_cat', 'postname', array(
'hierarchical' => true,
'label' => 'Categories',
'query_var' => true,
'show_admin_column' => true,
'rewrite' => array(
'slug' => 'my-category',
'with_front' => true
@ozamancse
ozamancse / custom-widget.php
Created May 29, 2016 12:00
Create Custom Widget
<?php
/**
* Social Icons Widget
*
* @description: A simple widget to display icons from your social profiles.
* @package HelpingHands
* @author Skat
* @copyright 2015, Skat Design
* @link http://www.skat.tf
* @since HelpingHands 1.0