Skip to content

Instantly share code, notes, and snippets.

View ahmedmusawir's full-sized avatar
:electron:
Working from home

ahmedmusawir

:electron:
Working from home
View GitHub Profile
@ahmedmusawir
ahmedmusawir / gist:ff485b5c64195f85b9fa9b12467fc4cd
Created January 18, 2018 09:27
ACF - ANALYTICS OPTIONS PAGE CODE
FUNCTIONS.PHP
/*=============================================
= ACF OPTIONS PAGE CODE =
=============================================*/
if( function_exists('acf_add_options_page') ) {
$option_page = acf_add_options_page(array(
'icon_url' => 'dashicons-chart-line',
@ahmedmusawir
ahmedmusawir / gist:8cb3aa27ef1f81ea1e3cf89f7a48309a
Created October 22, 2017 07:10
SIMPLE YOUTUBE - RESPONSIVE CODE
<section id="drasi-home-video-block" class="container-fluid">
<main class="container">
<figure class="col-sm-12 col-md-12 col-12">
<div class="embed-responsive embed-responsive-16by9">
<iframe class="embed-responsive-item" src="https://www.youtube.com/embed/oH_LfXnklRw?wmode=opaque&autoplay=1&loop=1&controls=1&showinfo=0&rel=0"></iframe>
@ahmedmusawir
ahmedmusawir / gist:8b5f991dda99f64cba0455656dbede4f
Created September 7, 2017 08:02
Get WP User Profile Info
<article class="text-content">
<?php
$cur_u_id = get_current_user_id();
$usr_info = get_userdata( $cur_u_id );
$user_name = $usr_info->display_name;
$join_date = $usr_info->user_registered;
@ahmedmusawir
ahmedmusawir / gist:fe10280a4593cf4328f914c0a9d40196
Last active September 7, 2017 07:25
Showing WP User Avatar with the plugin after disabling Gavatar
<?php
$cur_u_id = get_current_user_id();
echo "Current User ID: " . $cur_u_id;
// print_r(get_userdata( $cur_u_id ));
// echo get_avatar_url( $cur_u_id );
?>
<figure class="col-md-push-9 col-lg-push-9">
<section id="Title-Container" class="">
<div id="primary" class="container content-area col-sm-12 col-md-12 col-lg-12">
<main id="main" class="site-main" role="main">
<?php
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'contact' );
@ahmedmusawir
ahmedmusawir / BOOTSTRAP SLIDER FADE
Last active July 18, 2016 03:43
BOOTSTRAP SLIDER FADE
================
HTML
================
<section id="speaker-page-block-4">
<div class="content-wrapper">
<div class="container">
<div class="col-md-12">
<article class="right-text">
<h2><span class="lovely">WHAT PEOPLE ARE SAYING ...</span></h2>
<article id="testimonial-slider">
@ahmedmusawir
ahmedmusawir / video-bg.html
Created June 26, 2016 03:41
Video BG - Specific Block - HTML Only
<section id="block-2" class="block-2">
<figure class="video-container">
<video autoplay loop muted poster="img/second-section.jpg" id="second-section-video">
<source src="/wp-content/uploads/2016/06/video-20.webm" type="video/webm">
<source src="/wp-content/uploads/2016/06/video-20.mp4" type="video/mp4">
</video>
<!-- <h3>Featured Poems</h3> -->
<div class="text-content text-center featured-poem-1">
<p style="text-align: center;">You are in the right place <br>
if you’re ready to break through the blocks<br>
@ahmedmusawir
ahmedmusawir / wp-boot-modal.php
Created June 2, 2016 07:53
WP - BOOTSTRAP - MODAL BTN ON NAVBAR
/**
*
* Adding data attributes to Menu bar item ID menu-item-2912
* Use only the number at the end.
*
*/
add_filter( 'nav_menu_link_attributes', 'my_menu_atts', 10, 3 );
function my_menu_atts( $atts, $item, $args )
{
<?php $page_header_image = get_field( 'page_header_image' ); ?>
<header id="front-pg-header">
<?php if ( is_home() || is_single() || is_archive() || is_search() ) : ?>
<!-- <img class="img-responsive" src="http://tiana/wp-content/uploads/2016/01/tiana-header-img-1-noise-light-2.jpg" alt="tiana img"> -->
<!-- <img class="img-responsive" src="<?php echo $front_header_image; ?>" alt="tiana img"> -->
<?php //echo do_shortcode( '[layerslider id="1"]' ); ?>
<?php layerslider(2); ?>
@ahmedmusawir
ahmedmusawir / html-for-masonry.html
Last active May 15, 2016 13:35
The HTML for Masonry
<section class="container-fluid">
<div class="row">
<article class="col-md-moose">
<div id="grid-filter">
<select class="form-control">