For when you need to do it and just do it quickly.
<?php header('Location:http://www.yoursite.com/new_page.html'); ?>
Rank higher in Google organic search with 24 year experienced SEO professional Peter WM.
by Peter WM
For when you need to do it and just do it quickly.
<?php header('Location:http://www.yoursite.com/new_page.html'); ?>
by Peter WM
This is a sweet script. It displays all the files in a particular directory. In this case it’s a folder full of user uploads, so it makes keeping an eye on things a breeze.
[sourcecode language=”php”]‘;You can of course easily modify it to show only JPGs or other image types (if you’re pulling content from a directory of mixed file types) or to edit the echo so it returns images that link to user profiles etc.
But this is it’s most basic form.
by Peter WM
I have a small series of files I copy and paste whenever I’m about to start a new project, they have default templates for various files I use a lot. Like a header, footer, index page, blank stylesheet, and something called “top.php” that I use to open sessions and connect to databases.
There are also some of my standard folders pre-made too (with the correct server permissions) like “img” (images) and “upl” (uploads).
This was going to be last week’s #fridayfreebie, but here it is on a Wednesday instead.
This particular version is the one I use most commonly, and it’s set up for:
I’ve zipped it up to share! Feel free to do whatever you want with it—although there is a lot of Peter WM specific stuff in there, so you might want to take that out. Unless of course you like giving me credit for your work. 🙂
by Peter WM
I couldn’t quite work out how best to do create a custom RSS feed in WordPress.
My task seemed simple enough, to make an RSS feed of news articles from popular news sources…but the RSS feed needed to link back to the original source, NOT the article in WordPress.
Writing the PHP script to generate the RSS was simple, but the final step was getting WordPress to serve that feed.
Here’s the documentation I used, in addition to a custom field: