Wednesday, 1 July 2015
Monday, 8 June 2015
How to get category name from the product id in woocommerce
How to get category name from the product id in woocommerce.
// Get the product id from the order id -
<?php
$order = new WC_Order( $order->id );
$items = $order->get_items();
foreach ( $items as $itemty ) {
$product_id = $itemty['product_id'];
}
// then from product id get the category name
$cat_id=get_the_terms( $product_id, 'product_cat' );
foreach ( $cat_id as $ite ) {
echo $cat = $ite->name."<br>";
}
?>
Sunday, 7 June 2015
How to remove Malware From Website and Server via SSH
Websites & Server are infected with the Malwares for Spamming Purpose - SEO SPAM or SPAM EMAILS
If one Website on the Server has Vulnerability and hacker's get access to it. then its will be easy for them to infect all other websites hosted on the server.
Website Hacking Shell is used by them as a backdoor to the server which has the root privileges to make changes or upload new files on server.
Most of the malwares are BASE64 Encoded or Eval() or FilesMan.
How to locate the Malwares via SSH
Use Command -
or
If one Website on the Server has Vulnerability and hacker's get access to it. then its will be easy for them to infect all other websites hosted on the server.
Website Hacking Shell is used by them as a backdoor to the server which has the root privileges to make changes or upload new files on server.
Most of the malwares are BASE64 Encoded or Eval() or FilesMan.
How to locate the Malwares via SSH
Use Command -
grep -lr --include=*.php "eval(base64_decode" /var/www/
or
grep -lr --include=*.php "FilesMan" /home
Saturday, 9 May 2015
JQuery Scroll to Top effect

HTML -
<ahref="#"title="Back to top">^Top</a>
JQuery -
jQuery(document).ready(function($){
$(window).scroll(function(){
if ($(this).scrollTop() < 200) {
$('#smoothup') .fadeOut();
} else {
$('#smoothup') .fadeIn();
}
});
$('#smoothup').on('click', function(){
$('html, body').animate({scrollTop:0}, 'fast');
return false;
});
});
Complete -
<html>
<head>
<script>
jQuery(document).ready(function($){
$(window).scroll(function(){
if ($(this).scrollTop() < 200) {
$('#smoothup') .fadeOut();
} else {
$('#smoothup') .fadeIn();
}
});
$('#smoothup').on('click', function(){
$('html, body').animate({scrollTop:0}, 'fast');
return false;
});
});
<script>
</head>
<body>
<a href="#" title="Back to top">^Top</a>
</body>
</html>
Saturday, 25 April 2015
Script - Now Connect to database via FTP
Now its possible to connect to database and do modification in it via FTP
Sometimes we don't have access to the cpanel from where we can access the phpmyadmin for the database.
Simply upload the script and run it via URL. Enter the credentials for the database and do changes.
Download - Click Here
Friday, 24 April 2015
WordPress - Masonary Responsive Look for Blog Post
Create a page template like - "page-blog.php" post this file inside the theme files. "/wp-content/theme/yourtheme/page-blog.php"
<?phpCSS Code - Put this below code in themes "Style.css"
/**
* Template Name: Masonry Blog
*
* Blog Template
*
*/
?>
<?php include_once( 'header.php' ); ?>
<!-- Start the Loop. -->
<div class="masonry">
<?php
$temp = $wp_query;
$wp_query= null;
$wp_query = new WP_Query();
$wp_query->query('posts_per_page=100'.'&paged='.$paged);
while ($wp_query->have_posts()) : $wp_query->the_post();
?>
<div class="item">
<a href="<?php the_permalink() ?>" rel="bookmark" title="Click to view: <?php the_title_attribute(); ?>">
<?php the_title(); ?></a>
<?php if ( has_post_thumbnail() ) {
$size=75;
?>
<a href="<?php the_permalink() ?>" rel="bookmark" title="Click to view: <?php the_title_attribute(); ?>">
<?php the_post_thumbnail( $size ); } ?>
</a>
<?php the_excerpt(); ?>
<a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" class="read_more_link">Read More</a>
</div>
<?php endwhile;?>
<?php $wp_query = null; $wp_query = $temp;?>
<!-- stop The Loop. -->
</div><!-- container -->
<?php get_footer(); ?>
.masonry {
margin: 1.5em 0;
padding: 0;
-moz-column-gap: 1.5em;
-webkit-column-gap: 1.5em;
column-gap: 1.5em;
font-size: .85em;
}
.item {
display: inline-block;
background: #fff;
padding: 1em;
margin: 0 0 1.5em;
width: 100%;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-shadow: 2px 2px 4px 0 #ccc;
}
@media only screen and (min-width: 400px) {
.masonry {
-moz-column-count: 2;
-webkit-column-count: 2;
column-count: 2;
}
}
@media only screen and (min-width: 700px) {
.masonry {
-moz-column-count: 3;
-webkit-column-count: 3;
column-count: 3;
}
}
@media only screen and (min-width: 900px) {
.masonry {
-moz-column-count: 4;
-webkit-column-count: 4;
column-count: 4;
}
}
@media only screen and (min-width: 1100px) {
.masonry {
-moz-column-count: 5;
-webkit-column-count: 5;
column-count: 5;
}
}
@media only screen and (min-width: 1280px) {
.wrapper {
width: 1260px;
}
}
Categories
adminer
article submission website
base64 encoded
best footer designs
best icons
best social icons
boost seo
css darken effect on hovering
custom design icons
custom sidebar in wordpress
d-koder
darken effect on hover
database
default wordpress themes files
designing
edu & gov backlinks
eval()
FilesMan Shell
ftp
Generate random string
get category name from product id
get product id from order id
high PR websites
image hover effect
image submission
jquery effect
jquery scroll to top
locate malware via ssh
login signup
login/signup design
masonary look for blog
navigation menu
page template
php
php rand func()
php RAND function
responsive design
responsive menu
script
Search engine optimization
security
seo
social bookmarking
social icons
social icons for footer
social login design
sucuri
theme files
web
woocommerce
wordpress
wordpress design
wordpress theme development
