Connect with us

Tips & Tricks

WordPress Security Hacks

Published

on

Hi guys this is my first post on wpcult the great site Austin built.  Hope you guys find it usefull.

If you run a blog using the wordpress software then your blog is a target to hackers.  Below I will list some hacks and just how they can help you keep your business/site safe.

The following is  code to Block Bad Queries and protect your blog from malicious URL Requests.

Place the following code into a text file and name it what ever you like for example blockbadqueries.php upload it to your plugin folder and activate it in your wordpress admin just as you would any other Plugin

<?php
/*
Plugin Name: Block Bad Queries
Plugin URI:
http://perishablepress.com/press/2009/12/22/protect-wordpress-against-malicious-url-requests/
Description: Protect WordPress Against Malicious URL Requests
Author URI:
http://perishablepress.com/
Author: Perishable Press
Version: 1.0
*/
global $user_ID; if($user_ID) {
  if(!current_user_can(‘level_10’)) {
    if (strlen($_SERVER[‘REQUEST_URI’]) > 255 ||
      strpos($_SERVER[‘REQUEST_URI’], “eval(“) ||
      strpos($_SERVER[‘REQUEST_URI’], “CONCAT”) ||
      strpos($_SERVER[‘REQUEST_URI’], “UNION+SELECT”) ||
      strpos($_SERVER[‘REQUEST_URI’], “base64”)) {
        @header(“HTTP/1.1 414 Request-URI Too Long”);
 @header(“Status: 414 Request-URI Too Long”);
 @header(“Connection: Close”);
 @exit;
    }
  }
}
?>

 This Great plugin was made by Jeff Starr of Digging into WordPress

 

 

Protecting your blog with .htaccess 

.htaccess files have lots of possibilities. below is some code that will help protect your wordpress from modification of _REQUEST and/or GLOBALS and scripts injection.

 This is real simple just paste the following code into your .htaccess file. Always make a backup of your .htaccess before editing, better to be safe.

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
RewriteRule ^(.*)$ index.php [F,L]

 

Thanks to Oussama for this great hack

Themes

Fixing plugins not compatible with hybrid 0.4.2

Published

on

Hey everyone, as you may have noticed I have a running on the site. While everything almost everything moved over smoothly, there was an issue with how my parent theme striped text in typography. This caused some plugins, like cformsII to not be allowed to print to the screen. Justin had helped to find a fix to filter the hybrid_typography function.

Originally this function filtered out and changed some text that would not validate as XHTML. This had to be removed by running a new function in the child theme’s function.php file.

add_action('init', 'remove_typography');

function remove_typography() {
	remove_filter('the_content', 'hybrid_typography', 11);
}
Continue Reading

Plugins

Add the twittar plugin for WordPress w/ comment threading

Published

on

I talked about the Twittar plugin in a previous post. But learned that the read me text file was only useful for installing the necessary php code into WordPress themes that don’t have comment threading enabled.

Since most new themes past version 2.7, pull the comments section from functions.php file, that is where you have to edit the avatars in order to show the twittar settings.

First open you functions.php, and look for a line of code that says:

function custom_comment()

This is where your new comments are pulled from when you have the threaded comments enabled.

Now just find <?php echo get_avatar( $comment, $args['avatar_size'] ); ?> & replace with <?php twittar(70, "", "", "avatar avatar-70 photo", 1, "R"); ?>. Keep in mind that you will need to edit the Twittar setting to fit your site.

Continue Reading

Tips & Tricks

Styling your ordered & unordered list items into 2 columns

Published

on

In a previous post I showed you how to create a custom widget, then I showed you how to create a widget for your monthly archives, and limit the month’s that show. I am showing the past 4 months in my widget at this time.

One of my readers: Alex asked:

How did you make the archives widget to show the dates separately into two columns?

Now I will show you a CSS trick to create this effect:

First we will give the unordered list a width of 100%:

ul#archives {
	width:110%;
	}

Then we will style the <li> nested inside.

ul#archives li {
	display:inline;
	float:left;
	width:120px;
	}

And that is it. Please make sure that you clear the float after your closing </ul>.

Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Yandy Smith Net Worth

Yandy Smith Net Worth

Yandy Smith Net Worth. The American celeb Yandy Smith has a net value of $15 million. She is a reality TV star and music producer. Yandy started her professional career working in the entertainment industry. She started working as an executive assistant in a company called Violator Management. Some of her clients include high-profile musicians […]

Jasmine Luv Net Worth: How Rich is the YouTube star?

Jasmine Luv Net Worth: How Rich is the YouTube star?

Jasmine Luv is an American Youtuber who is known for her comedic videos which are very relatable to the fans. This has helped her to build a fan following on Instagram of over 1.3 million and is also working on a Youtube Channel that has already crossed 110k subscribers. As of 2019, Jasmine Luv net […]

Jasmine Roth Net Worth: How Rich is Jasmine Roth Actually?

Jasmine Roth Net Worth: How Rich is Jasmine Roth Actually?

Jasmine Roth is the founder of Built Custom Homes which focuses on custom designs for new construction projects. Moreover, Roth is also a television personality being the host of the show called Hidden Potential. As of 2019, Jasmine Roth net worth is estimated to be $1.5 million. Roth grew up in Virginia and since her […]

Justin Sun Net Worth: How Much is the Entrepreneur Worth?

Justin Sun Net Worth: How Much is the Entrepreneur Worth?

Justin Sun is an American Entrepreneur best known as the Founder and CEO of the TRON Foundation which created the TRON protocol, one of the largest blockchain-based operating systems. As of 2019, Justin Sun net worth is estimated to be $300 million. Justin was born on July 10, 1990, in San Francisco, California. He graduated […]

Trending