The problem. If you’re a developer who often publishes code snippets on your website, you have probably encountered the following problem: a user tells you that the code you posted doesn’t work. Why? Simply because, by default, WordPress turns normal quotes into so-called “smart quotes,” which breaks code snippets.
Read More >>
Author: alyaspk Categories: CMS & Forums, Wordpress Tags: curly, curly quotes, curly wp, normal quotes, normal quotes curly, wordpress, wordpress curly quotes, wordpress hack, wp, wp curly, wp hacks, wp normal quotes
The problem. Using custom fields to display images associated with your post is definitely a great idea, but many WordPress users would like a solution for retrieving images embedded in the post’s content itself.
The solution. As far as we know, there’s no plug-in to do that. Happily, the following loop will do the job: it [...]
Read More >>
Author: alyaspk Categories: CMS & Forums, Wordpress Tags: get image, images content, images hack, post, post content, post content images, wordpress hacks, wp content, wp hack, wp hacks
Sometimes you only want to show posts that you’ve added a specific custom field to. A typical post loop begins like this:
Read More >>
This tutorial will help you build a ‘Latest Posts by Category Archive‘ easily, this can be used to set up custom blog homepages, 404 pages, landing pages or even a special archive page. If you are looking for a plugin to generate such an archive, please check out: WP Plugin: Latest Posts by Category Archive.
Read More >>
Author: alyaspk Categories: CMS & Forums, Wordpress Tags: archive, archive wordpress, latest post, latest posts, plugin, post archive, post archive wordpress, wordpress, wordpress archive, wp archive, wp plugins, wp posts
Spice up your WordPress search page by highlighting search terms within your search results. The solution described in this tutorial will highlight both the title and post content and is a drop-in modification for WordPress.
Read More >>
Author: alyaspk Categories: CMS & Forums, Wordpress Tags: javascripts, jquery, jquery search terms, jquery terms, jquery terms search, search term, search term javascript, search term jquery, wordpress, wp tips, wp tricks
Most WordPress users including me are using custom fields to display thumbs on their blog homepage but i recently stumbled across a simple php function that allows you to grab the first image from the post automatically, and display it on your home page without the need to add any custom field to the post.
Read More >>
Author: alyaspk Categories: CMS & Forums, Wordpress Tags: display, display post, image, image hack, post automatically, post automatically image, posting, wordpress hacking, wordpress image, wordpress image hack, wp hacks, wp images, wp post
Many plugins and themes add JavaScript and CSS files to your site. While this alone isn’t necessarily a bad thing, using several plugins that do this can bog down your site with loads of requests for these files.
In this tutorial Justin Tadlock describes a smart solution to disable scripts and styles of your plugins by [...]
Read More >>
Author: alyaspk Categories: CMS & Forums, Wordpress Tags: disable scripts, disable style, hack wp, script, scripts and style, style, wordpress hacing, wordpress hack, wordpress hacking, wp hacking, wp hacks, wp scripts, wp styles
The problem.
Nowadays, most blogs display post excerpts on the home page along with an image. How about being even more original and providing readers with a nice “gallery” page, listing however many of your recent posts, and displaying each post’s lead image? Of course, we can easily achieve this with custom fields; but believe it [...]
Read More >>
The problem.
Introduced in WordPress 2.7, sticky posts are a very cool feature of our favorite blogging platform. A lot of WordPress users ask how to get only sticky posts in the loop.
The solution.
To display your five most recent sticky posts, just paste the following code anywhere in your theme files. If you want to display [...]
Read More >>
Author: alyaspk Categories: CMS & Forums, Wordpress Tags: latest sticky, latest sticky post, post, posts, sticky, sticky post, sticky posting, sticky posts, sticky wordpress, sticky wp, the latest post, wp posting
The problem.
The classic WordPress loop, which is used in most hacks in this post, is both useful and user-friendly. However, particularly when using a lot of custom loops (for example, in complex “magazine” layouts), you risk problems with resetting, offsetting, invalid conditional tags and other annoyances.
Read More >>
Author: alyaspk Categories: CMS & Forums, Wordpress Tags: jquery object, Loop, loops, wordpress loops, wp content, wp loop, wp loops, wp object, wp query, wp query content, wp query object