TheJer
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Managing 50-100 custom menusStill trying to figure out a way to work with this. I messed around in the wp_posts table, but with no luck. It didn’t seem like any of the menus were actually all linked together and easy to manage.
I’m guessing I might be out of luck on this?
Forum: Fixing WordPress
In reply to: Getting the alt text from an embedded imageWell I got it figured out. I’m hoping that simple regular expressions wont slow down the site in the long run. I’m not entirely sure why, but calling the_title_attribute would not return what I wanted. So I ended up using the_title and creating a little function called get_alt.
function get_alt( $str ) { $pattern = '/alt=\'(.*?)\'/'; preg_match($pattern, $str, $match); return $match[1]; }
$match looks like
[0] => alt=’whateveryouwerelookingfor’
[1] => whateveryouwerelookingforMy PHP/regex knowledge is somewhat limited, but I think its because I’m actually matching for the alt= part, but the saving whats in between the ” and that turns up in [1] spot in the array?
Either way, problem solved!
Forum: Fixing WordPress
In reply to: Getting the alt text from an embedded imagePrevious was obviously the wrong word to use haha. I should have said ‘the premise is to make the alt text the same as what the page used to be called.’ Either way, thank you for the help. I had been using the_title to grab the name, but I’ll play around with that and see if I can figure it out.
Forum: Fixing WordPress
In reply to: Managing 50-100 custom menusSo I discovered you can find all the menu information in the wp_posts table, but I’ve barely used SQL, so it is a lot of info sitting in that database and I’m not really sure what everything means.
Anyone have any pointers on what I could look for to find the custom menus? I’m sure if I knew what to look for, I could probably find it and figure it out.
Forum: Fixing WordPress
In reply to: Getting the alt text from an embedded imageYes I do understand what the alt text is supposed to be used for (unless it has somehow changed in the past few years?). I guess I just worded that badly because the image is the name of the page just in image form.
Forum: Fixing WordPress
In reply to: Making PageofPosts work with 2 categoriesOkay, the code is located here
Hopefully something has worked with something like this before?