Skip to content

Instantly share code, notes, and snippets.

View anwerashif's full-sized avatar
🚩
Coding

Anwer Ashif anwerashif

🚩
Coding
View GitHub Profile
@anwerashif
anwerashif / Elementor Progress Bar Animation CSS.css
Created June 27, 2022 06:04
Elementor Progress Bar Animation CSS
.c-loading .elementor-progress-wrapper {
-webkit-animation-duration: 10s;
animation-duration: 7s;
-webkit-animation-iteration-count: infinite;
animation-iteration-count: infinite;
-webkit-animation-name: loading;
animation-name: loading;
-webkit-animation-timing-function: linear;
animation-timing-function: linear;
}
<?php
$fields = array (
'field-01' => __( 'Icon URL', 'menu-item-custom-icon_field' ),
'field-02' => __( 'New Field', 'menu-item-custom-new_field' ),
);
// funtion to add fields to menu item
function add_menuset_c_fields( $id, $item, $depth, $args ) {
@anwerashif
anwerashif / front-page.php
Created May 17, 2018 13:39
Creating Custom Front Page Template Design for Blog in Genesis >> https://rainastudio.com/custom-front-page-template-design/
<?php
/**
* Front Page.
*
* @package StudioPlayer
* @link https://rainastudio.com/themes/studioplayer
* @author RainaStudio
* @copyright Copyright © 2018 RainaStudio
* @license GPL-2.0+
*/
@anwerashif
anwerashif / jumboshare.js
Last active May 9, 2018 11:36
Add Custom Social Share Buttons with Counter
/*
* JumboShare jQuery Social Share Buttons
* @package StudioPlayer
* @link https://github.com/mycodingtricks/jumboShare
*/
(function($){
$.fn.jumboShare = function( options ) {
var cssId = 'fontawesomeCss'; // you could encode the css path itself to generate id..
if (!document.getElementById(cssId))
{
@anwerashif
anwerashif / style.css
Created May 8, 2018 21:17
404 Page CSS in Genesis Framework
/* # 404 NOT FOUND page
---------------------------------------------------------------------------------------------------- */
.not-found .content, .not-found .content .entry {
background: transparent;
border-color: transparent;
}
.not-found .content {
margin: 7% auto 0;
}
@anwerashif
anwerashif / functions.php
Last active May 8, 2018 22:00
Register Custom Widget for 404 Not Found Page in Genesis
<?php
// Do NOT include the PHP opening tag.
// Register not-found-widget
genesis_register_sidebar( array(
'id' => 'not-found-widget',
'name' => __( '404 Page Widget', 'studio_player' ),
'description' => __( 'This is the widget area for 404 NOT FOUND page. It uses to add sign up form.', 'studio_player' ),
));
@anwerashif
anwerashif / 404.php
Last active May 8, 2018 21:27
Custom 404 Not Found Page in Genesis Framework
<?php
/**
* 404 NOT FOUND.
*
* @package StudioPlayer
* @link https://rainastudio.com/themes/studioplayer
* @author RainaStudio
* @copyright Copyright © 2018 RainaStudio
* @license GPL-2.0+
*/
@anwerashif
anwerashif / functions.php
Created April 26, 2018 05:44
Enqueue JS file to functions.php
<?php
// Do NOT include opening PHP tag.
// Enqueue 'sound.js'
add_action('wp_enqueue_scripts', 'sound_scripts');
function sound_scripts() {
wp_register_script( 'app-sound-js', get_stylesheet_directory_uri() .'/js/rainastudio.js', array( 'jquery' ), CHILD_THEME_VERSION, true );
wp_enqueue_script( 'app-sound-js' );
@anwerashif
anwerashif / sound.js
Created April 26, 2018 05:25
Pull audio file and play onclick
$(document).ready(function() {
var audioElement = document.createElement('audio');
audioElement.setAttribute('src', 'https://rainastudio.com/wp-content/themes/rainastudio/sound/rainastudio.mp3');
audioElement.autoPlay=false;
$('#soundPlay').click(function(e) {
audioElement.play();
// Cancel the default action
e.preventDefault();