Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
GRECOROMANGRABASS
May 14, 2020
It's been a while since I've used WordPress, and my googling doesn't seem to involve the right words.

I am trying to restructure an existing site, which contains many pages. Each page has information about a location where you can find a thing. The people that made this site do not have the locations classified in any particular way.

I want to create a URL structure similar to https://example.com/locations/state/city/name-of-a-place-where-thing-is and move the existing pages to the state and city they belong in, with 301 redirects from their existing URL to the new URL.

I imagine this is a common enough problem that someone might be able to nudge me in the right direction? Any help would be greatly appreciated.

Adbot
ADBOT LOVES YOU

GRECOROMANGRABASS
May 14, 2020
So, if a site has a bunch of content made using Visual Composer/WPBakery Page Builder, where all the useful data is embedded into buttons/other elements provided by the plugin, is there any sane way to strip all the VC formatting out of the post and dump the author-provided content it into another, non-VC based template?

I'm trying to help with a site that has over 1,000 posts. Each post has data that needs to go into a new layout.

I've tried pulling all the posts via the WP REST API, parsing the VC tags out, and saving the content that I want to keep without the markup generated by VC, and it occurs to me that I may be doing_it_wrong.

GRECOROMANGRABASS
May 14, 2020
I was afraid of that.

Yeah, it's a lot of extremely messy VC tags with random ids and I've written some cowboy code to parse data from each variation of the layout.

It's really terrible.

GRECOROMANGRABASS fucked around with this message at 20:35 on May 6, 2022

GRECOROMANGRABASS
May 14, 2020
I've seen wordpress sites that have multiple store locations with a permalink structure that is like "https://gas-station-guru.com/gas-station-finder/tx/dallas/gas-station-name"

Where gas-station-name is a post with info about a gas station in Dallas, TX.

I'm really having a hard time figuring out how to make this work with permalinks, custom post types, and custom taxonomies. I understand I could manually edit the permalink on a per-post setting, but this site has over a thousand locations to edit and I'm running out of time.

I assume the wordpress sites with this kind of link structure are set up like this (please correct me if I'm wrong)

gas-station-finder is the category base

tx is a term of the state taxonomy type
dallas is a term of the city taxonomy type

gas-station-name is just a posttype for a location in dallas, tx.

I feel like i'm missing something in the area of slug and has_front in my CPType / CPTax setup and I'm hoping someone will help me along in the right direction.

(I also need to support sity and state archive pages but I don't think that will be hard using the template hierarchy as a reference unless I have to do some wild rewrite rules.)

Or maybe I don't need two custom taxonomies? Should I just do taxonomy-name/term/term/post-name?

ANY help would be greatly appreciated!

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply