Skip to content

Instantly share code, notes, and snippets.

View malek1316's full-sized avatar

Md Abdul Malek malek1316

View GitHub Profile
@malek1316
malek1316 / ionicon.json
Last active September 11, 2018 10:23
Ion icon json file
{"name":"IonIcon", "icons":["pink ion-alert", "pink ion-alert-circled", "pink ion-android-add", "pink ion-android-add-circle", "pink ion-android-alarm-clock", "pink ion-android-alert", "pink ion-android-apps", "pink ion-android-archive", "pink ion-android-arrow-back", "pink ion-android-arrow-down", "pink ion-android-arrow-dropdown", "pink ion-android-arrow-dropdown-circle", "pink ion-android-arrow-dropleft", "pink ion-android-arrow-dropleft-circle", "pink ion-android-arrow-dropright", "pink ion-android-arrow-dropright-circle", "pink ion-android-arrow-dropup", "pink ion-android-arrow-dropup-circle", "pink ion-android-arrow-forward", "pink ion-android-arrow-up", "pink ion-android-attach", "pink ion-android-bar", "pink ion-android-bicycle", "pink ion-android-boat", "pink ion-android-bookmark", "pink ion-android-bulb", "pink ion-android-bus", "pink ion-android-calendar", "pink ion-android-call", "pink ion-android-camera", "pink ion-android-cancel", "pink ion-android-car", "pink ion-android-cart", "pink ion-androi
@malek1316
malek1316 / Simple Post View Count
Last active September 11, 2018 10:22
How create wp post view count without plugin
//Set the Post Custom Field in the WP dashboard as Name/Value pair Put it functions.php file
function lifestyleblog_PostViews($post_ID) {
//Set the name of the Posts Custom Field.
$count_key = 'post_views_count';
//Returns values of the custom field with the specified key from the specified post.
$count = get_post_meta($post_ID, $count_key, true);
//If the the Post Custom Field value is empty.
@malek1316
malek1316 / linearicon.json
Last active September 11, 2018 09:58
Linear icon font json file for free version
{"name":"Linearicons", "icons":["lnr lnr-home","lnr lnr-apartment","lnr lnr-pencil","lnr lnr-magic-wand","lnr lnr-drop","lnr lnr-lighter","lnr lnr-poop","lnr lnr-sun","lnr lnr-moon","lnr lnr-cloud","lnr lnr-cloud-upload","lnr lnr-cloud-download","lnr lnr-cloud-sync","lnr lnr-cloud-check","lnr lnr-database","lnr lnr-lock","lnr lnr-cog","lnr lnr-trash","lnr lnr-dice","lnr lnr-heart","lnr lnr-star","lnr lnr-star-half","lnr lnr-star-empty","lnr lnr-flag","lnr lnr-envelope","lnr lnr-paperclip","lnr lnr-inbox","lnr lnr-eye","lnr lnr-printer","lnr lnr-file-empty","lnr lnr-file-add","lnr lnr-enter","lnr lnr-exit","lnr lnr-graduation-hat","lnr lnr-license","lnr lnr-music-note","lnr lnr-film-play","lnr lnr-camera-video","lnr lnr-camera","lnr lnr-picture","lnr lnr-book","lnr lnr-bookmark","lnr lnr-user","lnr lnr-users","lnr lnr-shirt","lnr lnr-store","lnr lnr-cart","lnr lnr-tag","lnr lnr-phone-handset","lnr lnr-phone","lnr lnr-pushpin","lnr lnr-map-marker","lnr lnr-map","lnr lnr-location","lnr lnr-calendar-full","lnr ln
@malek1316
malek1316 / Ajax loading
Last active September 11, 2018 09:56
Ajax load more button for WordPress post
<!-- Front End Code - start -->
<div class="related-post">
<h3 class="title-small mb-30">related posts</h3>
<div class="row">
<ul class="ul-li-block portfolio-load">
<?php
$tags = wp_get_post_terms( get_queried_object_id(), 'post_tag', ['fields' => 'ids'] );
$args = [
@malek1316
malek1316 / get wp nav menu location
Last active September 11, 2018 09:53
How can get menu location by menu id or menu select option value
$menu_id = 6;
$locations = get_nav_menu_locations();
$menu_location_name = array_search($menu_id, $locations);
echo $menu_location_name;
6 is your menu id.