Sponsor
Blogroll
Meta
Category Archives: PHP
WordPress Pretty URL Sorting by Date
I don’t know how to title this post properly, so I am just going to try and explain it and see if then I can have a good title. I wanted to be able to sort custom post types by … Continue reading
Posted in PHP, Wordpress
Tagged add_action, add_filter, add_rewrite_rule, functions, PHP
Leave a comment
Simple Comment Spam Stopper
This is from Another Approach at Comment Spam, I couldn’t wait for a plugin to be made, So I just made it myself. All this does it add is a hidden field to the comment form, spam. And if anything … Continue reading
WordPress Instant Search
I have been getting a lot of requests lately to do an Instant Search type thing for a couple of my sites. I wasn’t really into it, and I am still not into it. I have had trouble lately with … Continue reading
Code Injection
So, I found out this weekend that I got all my sites injected with code. I tried deleting it and it just wouldn’t go away. It had injected itself into every plugin in the plugin folder. I tried removing the … Continue reading
Using Custom Fields in Comments
For a private wordpress site I have been using a custom comments table. It just has an added row where people rate the business. Everything is included in the comments table where I don’t need to make a custom table … Continue reading
Posted in PHP, Wordpress
3 Comments
Page Last Edited By….
I wanted to show when a post was last edited and who it was last edited by. If there s a function for this, I don’t know, but I found this on the wordpress forums and it works great. <?php … Continue reading
Posted in PHP, Wordpress
Leave a comment
Putting the_content into PHP
With this code you have the ability to remove images or remove the text and only show the images, or a flash embed code, with preg replace or however you want to. <?php $content = get_the_content() ?> Below will remove … Continue reading
Posted in PHP, Wordpress
Leave a comment
Dynamic Copyright
I hate hate hate sites that don’t update there copyright. I know if you don’t use some sort of template system it can be hard to shift through all of your pages to do this. So make your website with … Continue reading
Dyanmic Image Resizing
I use timthumb for dynamic image resizing. It works on most webhosts and requires little to no setting up. All you have to do is upload the file to your website and link to it like so: <img src=”//timthumb.php?src=/images/whatever.jpg&h=150&w=150&zc=1″ alt=”" … Continue reading