Skip to content

Instantly share code, notes, and snippets.

View tanjimahmmed's full-sized avatar
🎯
Focusing

Md Tanjim Ahmmed tanjimahmmed

🎯
Focusing
View GitHub Profile
@tanjimahmmed
tanjimahmmed / Custom post loop with custom fields
Created March 2, 2020 07:33
Custom post loop with custom fields
<?php
global $post;
$args = array( 'posts_per_page' => -1, 'post_type'=> 'posttype', 'orderby' => 'menu_order', 'order' => 'ASC' );
$myposts = get_posts( $args );
foreach( $myposts as $post ) : setup_postdata($post); ?>
<?php
$job_link= get_post_meta($post->ID, 'job_instructions', true);
?>
@tanjimahmmed
tanjimahmmed / Piklist Repeat Fun
Created March 29, 2020 15:44
Piklist Repeat Fun
function t_process_section_type($part){
global $post;
if('section'== $post->post_type ){
$section_type = get_post_meta($post->ID, 't_section_type', true);
$sections = array('banner','testimonial','service','newsletter','skill');
foreach($sections as $section){
if("section-{$section}.php"== $part['part'] && $section != $section_type){
return false;
}
}
<?php
/**
* Plugin Name: Timer Element Elementor
* Plugin URI:
* Description:
* Version: 1.0
* Author: MD Tanjim
* License: GPLv2 or later
* Text Domain: timerelement
* Domain Path: /languages/
git add .
git commit -m "commit name"
git push -u origin main
git branch - for check
git branch -c branch_name
git checkout branch_name
git push origin head
git pull ( for updated code )