Articles of customization

Protect changes made to the theme when updating

I customized the wordpress theme I’m using by changing php, css and even a js file. Is there a way to protect these changes, when updating the theme to a new version?

How to display post title & excerpt when mouse hovers on an image?

I am bit busy with developing one fashion website, currently (http://test-domain.zakirsajib.co.uk/), where I have images come from posts and when mouse will hover on any image, the corresponding post title and post excerpt will de displayed. Couldn’t make it happen though 🙂 Any clue will be helpful. Site is developing in wordpress enviornment, so any […]

How can a single line in a blog post take down my server?

I’ve been trying to write a post about a simple Windows Powershell script for the last few hours, but when I try to preview the post with the script included, it takes down my server. Unfortunately the server isn’t mine to control (it’s hosted by 34sp.com) so I’m limited in what I can do to […]

How to find if a post with custom_field == X exists?

I need to find if a post with a custom field X equal to Y exists in a wordpress installation. Should I do it with a simple sql query or is there something build in that can help me achieve it?

How can I get the intended URL in a 404?

I am customizing a 404 page, and I would like to know the correct way to get the intended URL within 404.php. Do I use $_SERVER[‘REQUEST_URI’] as some online resources seem to suggest, or is there a WordPress builtin?

Exclude custom taxonomy tag from loop

I have the following code at the beginning of a loop: <?php query_posts(‘showposts=3&cat=84’); ?> <?php $posts = get_posts(‘category=84&numberposts=3&offset=0’); foreach ($posts as $post) : start_wp(); ?> I have a custom taxonomy called “display,” with a tag called “featured-slider.” In this loop, I want to include everything from category 84, but I want to exclude everything with […]

Select category in custom query

I’m sure this question is asked alot, but I cannot figure it out, since all the different ways to query posts are confusing me.. Here is my current code. How can I tell the code to only get posts from category ID #22? <?php $querystr = ” SELECT post_id, AVG(meta_value) AS total, COUNT(post_id) as num_karakter […]

File available but giving 404 in wordpress

Hey, im not sure why but php files other then wordpress either redirects to homepage or gives a 404. for example i have a timthumb.php in directory /js/ it was working fine and generating thumnails for me.. but it started to give 404 on even running the direct url. You can take a look here […]

How to post twitter like updates on wordpress

Is there a plugin or a hack such that I can make short updates similar to twitter’s on my own wordpress blog? Perhaps making use of a custom post type or something on those lines? What i’m trying to achieve is to create short (150 character limit) posts different to the regular posts on the […]

User Roles Not Sticking

I have added a custom user role of super_poster, basically they make 20 posts and once they hit $postlimit get auto-moved back down to contributer level, the moving down and post counting works ok, my problem is that the wp system adds the user into “none” instead of into contributer role if ($count_posts >= $postlimit) […]