Featured images don’t play nice with wordpress multisite. The problem is when you use standard wordpress/genesis functions, the paths to the images are all wrong!!!! (When using timthumb of course).
I was using it for a theme demo of my blog actually and used subdirectories on my multisite. But every time I added a featured image, it would be broken…
So here’s a quick little fix that will get it working correctly!
Add this to your functions.php file:
Now when you go to use timthumb, you can use something like:
And that’s all there is to it! Feel free to ask questions!
About the AuthorWhat's UP! This is my site, I write 99% of the articles on here. I'm also the owner of SureFireWebServices.com. I help out a lot of developers and designers getting into the web game. Helping is fun for me, so feel free to ask me any questions! I've made courses and have a membership as well to help get you on your feet!
You Might also like
By Jonathan Perez — 1 year ago
I host a bunch of websites. I love doing it because I’m in control of every aspect that goes on with them. I can monitor server load, I can make edits to my server to install new versions of PHP, or mem_cache, or whatever.
One thing that I’ve been harping on a lot is security. I have a plugin called Ninja Firewall on a few of my sites that monitors any file or DB change.
Now this never happened to me before but last night, around 11:30 (still awake, getting tired) I received 3 emails, back to back.
The first was Email Change, then New User Registration, then WordPress Login.
I know the user of the site personally so I KNOW that this is not normal behavior. Also, the name that was being registered was none other than…. trump (dot) clinton at usa dot com! HAHAHA
So I actually got to stop this hack while it was going on, I felt like a super hero, lol.
So here are some steps that I did to remove the hack, because I’m finally getting good at this 🙂
Step 1 – Clean WordPress
The first thing I did was delete everything except the
wp-contentfolder and the
This makes sure that any core affected files are gone! After I delete them, I unzip a fresh download of WordPress, and upload all the files except for wp-content.
MAKE SURE YOU UPLOAD THE SAME VERSION OF WORDPRESS OR SH*T WILL BREAK.
Now I have a fresh WP install.
Step 2 – Go Into WP-Content
I keep all my builds as simple as possible so I have a pretty good grasp on what should and should not be in my WP-Content folder. A great way to check would be to organize what’s in the WP-Content folder by edit date. Check to see if anything was edited recently, and if it was a file, determine if you actually need that file.
A lot of times, what ends up outside of the plugins or themes folder is backups, caching files, things like that. Verify the plugins on the site to make sure that those files are actually being used. Most of the time, if you delete one of these files and then log into WordPress, you’ll get a warning or error message in your dashboard, so don’t stress too much. Delete what you don’t need.
Step 3 – Remove What You Don’t Use
Give your site a quick audit. If you’re not using the 2015 theme, then remove it. Anything you know for a fact you’re not using, delete it. Plugins are a little trickier but do the date thing again. See what was edited recently and check to see if it’s active on the site. If it’s not, DELETE!
Step 4 – Do A Scan
I like to use the plugin Anti-Malware Security and Brute-Force Firewall. It’s very thorough, and it’s free so you can’t beat it. I don’t like using Sucuri or anything like that because to me, it’s always missing something. I’ve had some great luck with the other plugin though and was able to fix/quarantine hacked files.
Step 5 – Harden Your Install
For this, I will either use the iThemes Security Plugin, or my favorite which is currently SecuPress. Both are free, both will harden your website. Just follow the instructions when you install them and you should be good to go!
BONUS – Track Things
If you want to take an additional step, you can install a file monitor. I use NinjaFirewall (which is how I noticed all the things happening on the site). But you can use whatever you feel comfortable with. There are some site audit plugins out there that will email you when things happen on the website, so feel free to look into any of those.
ALWAYS BACK UP!
The worse case scenario is you can’t fix it. Now what do you do? You can hire someone OR you can restore a clean back up. So make sure you’re sites are always backed up!
If you’re reading this thinking to yourself, “man I don’t want to deal with that crap,” then let us help you out. We don’t offer clean up services, but we do host website which we treat as if they are our own! Send your clients our way for hosting needs, we promise we’ll take care of them! (White Labeled too, so you can take all the credit.)Post Views: 910
By Jonathan Perez — 1 year ago
I use Toolset all the time. One thing that constantly annoys me is when I need to create a simple grid loop. For some reason, Toolset loves to stick with tables as a grid format, unless you’re using Bootstrap. Well, I don’t want to use Bootstrap. I use Genesis.
So here’s a simple way to get your grid loop working with Genesis and any other theme for that matter.
What Views Gives You
When you go into views, and you’re getting ready to create a loop, you get the options of “Unformatted, List, Table Grid, Bootstrap Grid, etc.” Bootstrap grid, however, is blocked out because it knows that you’re not using Bootstrap. You’re damn right I’m not! (I like bootstrap, but I use Genesis)
So when you select the table grid, here’s the mess that Views gives you.
Let’s fix it and use the classes that are already included in the Genesis Framework.
Yay!! Now it’s clean. Here’s a quick explanation of how this grid works.
How The Grid in Views Works
The first part of the grid looks like this:
That means that it’s the first cell or the first place in your grid. So if you’re doing a grid with 3 columns, this indicates that it’s the first placement of your grid.
The second key factor in this setup is
This is equal to all the in-betweens in your grid set up. So if you have 5 columns, 10 columns, or 3, the index=other is everything in between the first and last column.
Next, you have
The three in this fancy little shortcode is the last column. You can make it whatever number you want, but keep in mind that this will be the last column in the grid.
I’m going to group the next two gems together. They are:
This little gem is the filler for when your grid ends. If you have a grid with three columns, but you only have 7 items. That’s going to throw the grid off.
So pad, once again, is the in between fluff. Similar to index=other except that, it’s empty. You may have already guess what pad-last is, but if not, it’s the last empty shell in your grid.
The point of the padding is if you have a background color or things that you need to clear, you can do it in the last empty column and continue the look of your grid without having it break the grid itself.
Isn’t views awesome! 😀
Have any other cool methods for a grid? Let me know in the comments. Otherwise, enjoy!
What’s that? You don’t have the classes! No problem, here you go!Post Views: 683
By Jonathan Perez — 6 years ago
So I had to figure this out for one of my clients and what a pain. I found a bunch of code out there that said they edited the length of the excerpts, but they didn’t. Then I did some research on the wordpress codex and found out some interesting things about the excerpt. THEN I finally found the code to shorten it! Read MorePost Views: 1,324