By miguel on March 9, 2010
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 [...]
Posted in Tips & Tricks | Tagged .htaccess, block bad queries, Blog, code, malicious url requests, plugin, query string, request, request uri, rewritecond query, rewritecond query string, server, server request, server request uri, strpos, strpos server, strpos server request, uri, WordPress
By Austin on October 15, 2009
Social networks are everywhere. I am sure you’re on facebook. Well why not at a facebook share script to your site?
Posted in Tips & Tricks | Tagged How to, shortcodes
By Austin on June 10, 2009
Custom fields are definitely very useful and are used on many WordPress installs. Today I’m going to show you how to easily get custom fields values outside the loop.
Posted in Tips & Tricks | Tagged custom fields, php
By Austin on May 15, 2009
Ever wanted to print or echo the WordPress title attribute without spaces?
Posted in Tips & Tricks | Tagged php, the_title, Tips & Tricks
By Austin on May 11, 2009
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.
Posted in Tips & Tricks | Tagged jQuery, Show/Hide, toggle
By Austin on May 9, 2009
Have you ever wanted to display the excerpt only if you write one? A simple couple lines of code can display the_excerpt any where you like.
Posted in Tips & Tricks | Tagged $post, post_excerpt, the_excerpt
By Austin on April 15, 2009
This is a simple one.
/**
* Your Blog title
*
*/
function my_blog_title() {
$blogname = get_bloginfo(‘name’);
return ‘<span class=”blog-title”>’ . $blogname . ‘</span>’;
}
add_shortcode(‘blog-title’, ‘my_blog_title’);
Just add this to your functions.php file and then add [blog-title] in any post or page and it will return your Blog Title.
Posted in Tips & Tricks | Tagged functions, shortcodes, Tips & Tricks
By Austin on April 9, 2009
How might you display a Google ad after the first post or anything you like? It is very simple. You just need to add the variable $loopcounter in the Loop. If the $loopcounter is less than or equal to 1, then include your option. Check out the code:
<?php if (have_posts()) : while (have_posts()) : the_post(); [...]
Posted in Tips & Tricks | Tagged php, the loop
By Austin on April 6, 2009
Here is a simple way to call query_posts with an array of options. For all options you my use visit: WordPress Codex.
<?php $my_query = array(’showposts’ => 4, ‘post__not_in’ => $do_not_duplicate); ?>
<?php query_posts($my_query); ?>
Posted in Tips & Tricks | Tagged php, query_post, WordPress
By Austin on April 2, 2009
Looking to add a favicon to you site?
Inside your WordPress theme’s functions file (functions.php) add the following to inside your PHP code.
/**
* FAVICON
* @WPCult.com
*/
function my_favicon() { ?>
<link rel=”shortcut icon” href=”<?php echo bloginfo(“stylesheet_directory”) ?>’/images/favicon.ico” />
<?php }
add_action(‘wp_head’, ‘my_favicon’);
That’s it, just be sure to upload an icon image or a .gif/.png. Be sure to [...]
Posted in Tips & Tricks | Tagged favicon, functions, functions.php
Recent Comments