View wp-login-logo-change
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* ------------------------------------------------ | |
Custom login image logo | |
------------------------------------------------ */ | |
function my_custom_login_logo() { | |
echo '<style type="text/css"> | |
h1 a { background-image:url('.get_bloginfo('template_url').'/images/loginlogo.png) !important; } | |
</style>'; | |
} | |
add_action('login_head', 'my_custom_login_logo'); |
View Get Featured image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// get featured image for this page | |
if ( has_post_thumbnail()) { | |
$large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full'); | |
} | |
?> |
View Wordpress Sortcode use in PHP template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php echo do_shortcode("[shortcode]"); |
View Convert Numbers to Words - Bangladesh.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Function: convert_number | |
* | |
* Description: | |
* Converts a given integer (in range [0..1T-1], inclusive) into | |
* alphabetical format ("one", "two", etc.) | |
* | |
* @int | |
* |
View g-chart-vertical-text.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var options = { | |
title: "Test", | |
hAxis: { | |
direction:-1, | |
slantedText:true, | |
slantedTextAngle:90 // here you can even use 180 | |
} | |
}; |
View smoothScrolling.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<script type="text/javascript"> | |
$('a').click(function(){ | |
$('html, body').animate({ | |
scrollTop: $( $.attr(this, 'href') ).offset().top | |
}, 800); | |
return false; | |
}); | |
</script> |
View wordpress_domain_issue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#paste this into domain.com/wordpress installation .htaccess | |
# BEGIN WordPress | |
<IfModule mod_rewrite.c> | |
RewriteEngine On | |
RewriteBase /wordpress/ | |
RewriteRule ^index\.php$ - [L] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d |
View WordPress_Jquery.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function add_scripts() { | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', | |
'//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js'); | |
wp_enqueue_script( 'jquery' ); | |
} | |
add_action('wp_enqueue_scripts', 'add_scripts'); | |
View ubuntu_commands
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
move/rename a folder: mv /home/user/oldname /home/user/newname | |
Delete a folder with files: rm -rf Folder_name | |
View simple-add-this.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// paste this section in your functions.php | |
function j_add_this_social() { | |
return '<div class="addthis_toolbox addthis_default_style "> | |
<a class="addthis_button_facebook_like" fb:like:layout="button_count"></a> | |
<a class="addthis_button_tweet"></a> | |
<a class="addthis_button_pinterest_pinit" pi:pinit:layout="horizontal"></a> | |
<a class="addthis_counter addthis_pill_style"></a> | |
</div> | |
<script type="text/javascript">var addthis_config = {"data_track_addressbar":true};</script> |
OlderNewer