Connect with us

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
4 Comments

4 Comments

  1. Alex

    February 15, 2009 at 7:28 pm

    Thank you, man!

  2. trosor

    February 22, 2009 at 2:04 pm

    nice information

  3. cotton

    February 23, 2009 at 1:51 am

    This is great but is there away to make the list go 1-2 on the left column and then 3 & 4 on the right. I have spent ages trying to organize a list like that. I think it would make sense, if you have a list in 2 columns, you first read the left one and then the right one. Any thoughts or suggestions on this would be much appreciated

    • frosty

      February 23, 2009 at 1:50 pm

      As far as I know, I don’t know a way to do this.

You must be logged in to post a comment Login

Leave a Reply

Tips & Tricks

How to: Add a contact me via Skype™ button

Published

on

This little trick is really simple and easy. All you need to do is plug this line of code anywhere you would like to use the text.

<a onclick="return skypeCheck();" href="skype:austin.passy?call">Call me on Skype!</a>

That’s is, pretty simple huh? Just make sure you change skype:austin.passy to your user name!

Want a test? Well, please use the text button, as I was getting to many call’s and hangups: Call me on Skype! Message me on Skype!

Thanks to Shayne for this code!

Update:

I was reminded by Shayne that you will have to add this script into your header.php file:

<script type="text/javascript" src="http://download.skype.com/share/skypebuttons/js/skypeCheck.js">
</script>

That way if the user doesn’t have Skype, they will be prompted to download it if they would like :).

Continue Reading

Tips & Tricks

How to: show/hide a widget in WordPress with jQuery

In a previous post I talked about how to show/hide a single div html code with a search inside. Today I’d like to show you how I implemented jQuery into my new theme.

Published

on

As seen in the current theme, I am using jQuery to animate the show/hide or as known as the css style display: none;.

Since I am using a custom child theme on my site, and have Hybrid theme as my parent, the widgets or sidebar section is different than may be in your theme. But just apply the the style’s as follows to your theme.

First make sure that your WordPress site is calling jQuery, by plugging in this code into your header.php file above the <?php wp_head(); ?> text:

<?php wp_enqueue_script('jquery'); ?>

Then anywhere above the </head >, plug this code in:

<script type="text/javascript">
function toggleWidgets() {
	$('#primary h3.widget-title').addClass('plus');

	$('#primary h3.widget-title').click(function() {
		$(this).toggleClass('plus').toggleClass('minus').next().toggle(180);
	});

}
$(document).ready(function() {
	toggleWidgets();
}
</script>

That’s it. Pretty simple huh.

So lets go over what the code does.

$('#primary h3.widget-title').addClass('plus');

This line finds all <h3> tags with the class widget-title inside the ID parameter of #primary and adds a class of plus.

Then

$('#primary h3.widget-title').click(function() {
		$(this).toggleClass('plus').toggleClass('minus').next().toggle(180);
	});

Will apply a click function. When the H3 tag is clicked it will remove the class plus and add the class minus.

Then the code that says .next will then toggle the “next” element after the <h3> title.

Continue Reading

Tips & Tricks

WordPress Security Hacks

Published

on

By

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

Continue Reading

Random Search Terms

Title

Recent Posts: Fully Net Worth . com

Brandi Redmond Net Worth: How Rich is Brandi Redmond Actually?

Brandi Redmond Net Worth: How Rich is Brandi Redmond Actually?

Brandi Redmond is an American reality television star best known for being a cast member of the show ‘The Real Housewives of Dallas’. As of 2019, Brandi Redmond net worth is estimated to be $4 million. Brandi was born on July 10, 1978, which makes her currently 41 years of age. She was born and […]

Matt Higgins Net Worth: 5 Interesting Facts You Should Know

Matt Higgins Net Worth: 5 Interesting Facts You Should Know

Matt Higgins is a celebrated man, who came from the downsides of life to the upper echelons of the world. An investor, businessman, innovator, top executive, and business advisor. Although he had a hard early life at the beginning, he never let background shackles deter him as he steadily moved his way to success. He’s […]

Dorian Rossini Net Worth: How Rich is Dorian Rossini Actually?

Dorian Rossini Net Worth: How Rich is Dorian Rossini Actually?

Dorian Rossini is a singer and an internet personality. He is best known for being a viral sensation on the internet for the controversy of taking Selfies with him. One moment in an interview would roar the internet on fire as the incident made him famous almost overnight. As of 2019, Dorian Rossini’s net worth […]

9lokkNine Net Worth: How Rich is the Rapper Actually?

9lokkNine Net Worth: How Rich is the Rapper Actually?

Jacquavius Dennard Smith, who is better known by his stage name as 9lokkNine, is an American rapper. He is best known for his hit songs such as “10 Percent” and a collaboration on a song called “223s” with the controversial rapper named YNW Melly which was an even bigger hit. The latter one was able […]

Trending