Skip to content

Instantly share code, notes, and snippets.

View munirkamal's full-sized avatar
🎯
Focusing

Munir Kamal munirkamal

🎯
Focusing
View GitHub Profile
@munirkamal
munirkamal / header.php
Created October 6, 2015 08:50
Underscores default files
<?php
/**
* The Header for our theme.
*
* Displays all of the <head> section and everything up till <div id="main">
*
* @package Underscores.me
* @since Underscores.me 1.0
*/
?><!DOCTYPE html>
<link rel="import" href="../paper-tabs/paper-tabs.html">
<link rel="import" href="../paper-tabs/paper-tab.html">
<link rel="import" href="../core-pages/core-pages.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
@munirkamal
munirkamal / Wordpress - Track and Display post views.php
Last active April 12, 2018 23:45
Wordpress snippet to track and display post or page views in your wordpress website without using any plugin.
/*******************************************************/
/ Shared by www.codewordpress.com /
/ Add following code to Function.php file in your theme /
/*******************************************************/
<?php
function getPostViews($postID){
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){