Skip to content

Instantly share code, notes, and snippets.

@pradeepdotco
pradeepdotco / alexa widget
Created October 14, 2015 19:32
Alexa Widget to show show Website Rank
<a href="http://www.alexa.com/siteinfo/wpism.com"><script type="text/javascript" src="http://xslt.alexa.com/site_stats/js/t/a?url=wpism.com"></script></a>
@pradeepdotco
pradeepdotco / Alexa widget links
Created October 14, 2015 19:33
Alexa Widget to show show Website Rank and Links
@pradeepdotco
pradeepdotco / content medium IFTTT
Created October 15, 2015 21:13
Content HTML Code for Medium IFTTT
<p><a href="{{PostUrl}}"><img src="{{PostImageUrl}}"></a></p>
<p>{{PostContent}}</p>
<p><em>Originally published on <a href="{{PostUrl}}">Wordpress</a></em></p>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<script>
(adsbygoogle = window.adsbygoogle || []).push({
google_ad_client: "ca-pub-your publisher id here",
enable_page_level_ads: true
});
</script>
@pradeepdotco
pradeepdotco / post-edit-button.php
Created November 9, 2015 21:49
Post Edit Button
<?php edit_post_link(__('{Quick Edit}'), ''); ?>
@pradeepdotco
pradeepdotco / Comments-Edit-Button.php
Created November 9, 2015 21:50
Comments Edit Button
<?php edit_comment_link(__('{Quick Edit}'), ''); ?>
@pradeepdotco
pradeepdotco / disable-wordpress-search.php
Created November 9, 2015 22:12
Disable WordPress Search
function fb_filter_query( $query, $error = true ) {
if ( is_search() ) {
$query->is_search = false;
$query->query_vars[s] = false;
$query->query[s] = false;
// to error
if ( $error == true )
$query->is_404 = true;
@pradeepdotco
pradeepdotco / absolute-path.php
Created November 10, 2015 23:00
Absolute Path
<?php
$p = getcwd();
echo $p;
?>
@pradeepdotco
pradeepdotco / Associative arrays PHP WordPress
Created November 13, 2015 21:12
Associative arrays PHP WordPress
$my_array = array(
[tab]'WP' => 'somevalue',
[tab]'WP2' => 'somevalue2',
[tab]'WP3' => 'somevalue3',
[tab]'WP34' => 'somevalue3',
);
@pradeepdotco
pradeepdotco / wp list categories
Created November 13, 2015 22:17
Template Tags wp list categories
<?php
$args = array(
'show_option_all' => '',
'orderby' => 'name',
'order' => 'ASC',
'style' => 'list',
'show_count' => 0,
'hide_empty' => 1,
'use_desc_for_title' => 1,
'child_of' => 0,