Skip to content

Instantly share code, notes, and snippets.

View Ariflaw's full-sized avatar
🏠
Working from home

Nur Arif Ariflaw

🏠
Working from home
View GitHub Profile
@Ariflaw
Ariflaw / Snippet Remove Title Attribut from Wordpress Menu Link
Last active April 15, 2021 09:37
Remove Title Attribut from Wordpress Menu Link with function Fillter WP_NAV_MENU
@Ariflaw
Ariflaw / Remove Title Attribut from Wordpress Menu Link with Javascript
Created November 28, 2014 00:05
Remove Title Attribut from Wordpress Menu Link with Javascript
@Ariflaw
Ariflaw / Search Form Wordpress
Last active October 24, 2023 19:52
Search Form Wordpress ( searchform.php )
<form role="search" method="get" class="search-form" action="<?php echo home_url( '/' ); ?>">
<label>
<span class="screen-reader-text"><?php echo _x( 'Search for:', 'label' ) ?></span>
<input type="search" class="search-field" placeholder="<?php echo esc_attr_x( 'Search …', 'placeholder' ) ?>" value="<?php echo get_search_query() ?>" name="s" title="<?php echo esc_attr_x( 'Search for:', 'label' ) ?>" />
</label>
<input type="submit" class="search-submit" value="<?php echo esc_attr_x( 'Search', 'submit button' ) ?>" />
</form>
Place on searchform.php
Source: http://codex.wordpress.org/Function_Reference/get_search_form
@Ariflaw
Ariflaw / Snippet HTML5
Created November 30, 2014 00:24
Snippet HTML5
<!DOCTYPE HTML>
<!--[if lt IE 8 ]><html class="no-js ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="no-js ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 8)|!(IE)]><!--><html class="no-js" lang="en"> <!--<![endif]-->
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
@Ariflaw
Ariflaw / Base Threaded Comments Styling Wordpres
Created December 6, 2014 00:10
Base Threaded Comments Styling Wordpres
ol.commentlist { list-style:none; margin:0 0 1em; padding:0; text-indent:0; }
ol.commentlist li { }
ol.commentlist li.alt { }
ol.commentlist li.bypostauthor {}
ol.commentlist li.byuser {}
ol.commentlist li.comment-author-admin {}
ol.commentlist li.comment { border-bottom:1px dotted #666; padding:1em; }
ol.commentlist li.comment div.comment-author {}
ol.commentlist li.comment div.vcard { font:normal 16px georgia,times,serif; }
ol.commentlist li.comment div.vcard cite.fn { font-style:normal; }
<?php
// Soundcloud has a shortcode for WordPress.com,
// but it doesn't work on self-hosted WordPress sites.
// To make the standard shortcode work, add this to your functions.php file.
// Here is what Soundcloud's "WordPress Code" shortcode looks like:
// [soundcloud url="http://api.soundcloud.com/tracks/95232600" params="" width=" 100%" height="166" iframe="true" /]
function soundcloud( $atts, $url='' ) {
extract(shortcode_atts(array(
'url' => 'http://',
@Ariflaw
Ariflaw / Example shortcode soundclound
Created January 14, 2015 03:55
Example shortcode soundclound
ShortCode Wordpress
[soundcloud url="https://api.soundcloud.com/tracks/175583328" params="auto_play=false&hide_related=false&show_comments=true&show_user=true&show_reposts=false&visual=true" width="100%" height="450" iframe="true" /]
Standard Iframe
<iframe width="100%" height="450" scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/175583328&amp;auto_play=false&amp;hide_related=false&amp;show_comments=true&amp;show_user=true&amp;show_reposts=false&amp;visual=true"></iframe>
<?php
/**
* Slideshow shortcode usage: [gallery type="slideshow"] or the older [slideshow]
*/
if(!class_exists('zl_add_jetPack_slideshow')){
class zl_add_jetPack_slideshow {
public $instance_count = 0;
function __construct() {
@Ariflaw
Ariflaw / atom snippet
Last active March 18, 2016 00:46
All code for atom snipper
'.source.css, .source.scss, .source.less':
'Comment Head Style':
'prefix': 'sch'
'body': """
// ======================================================================== /
// Title
// ======================================================================== /
"""
'Comment Sub Head':
'prefix': 'scs'
@Ariflaw
Ariflaw / spintax.php
Created July 11, 2016 06:07 — forked from irazasyed/spintax.php
PHP: Text Spinner Class - Nested spinning supported.
<?PHP
/**
* Spintax - A helper class to process Spintax strings.
* @name Spintax
* @author Jason Davis - https://www.codedevelopr.com/
* Tutorial: https://www.codedevelopr.com/articles/php-spintax-class/
*/
class Spintax
{
public function process($text)