Geodirectory Custom Rewrites
This topic contains 14 replies, has 3 voices, and was last updated by Alex Rollin 5 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket-
AuthorPosts
-
August 21, 2018 at 2:43 am #443260
I am trying to add geodir_metro to the permalink structure. We want to have this as a prefix before city.
I added metro as a permalink option in the admin and got the rewrites to work by modifying taxonomy_functions.
Only trouble I am having trouble with is getting wordpress to read the permalinks, right now everything returns to a 404 page.
I am pretty well versed in PHP and wordpress. I am trying to modify custom_taxonomy_hooks_actions.php, but I can’t get it to work.
Can someone please point me to the right spot where I can add rules for reading permalinks for posts? I am looking at geodir_listing_rewrite_rules but this seems to only be the listing page rewrites.
Would it maybe be easier to modify it so that I can add geoodir metro as the prefix as %%gd_metro%%?
Any help would be greatly appreciated.
August 21, 2018 at 6:21 am #443281Hello Doug,
is ‘metro’ a custom field?
Have you already tried ‘region’ and that isn’t what you are looking for?
August 21, 2018 at 3:15 pm #443346It’s a custom field. Is it possible modify url rewrite structure to include it? Region doesn’t work as it usually maps to the state. For example Havertown is Philadelphia metro area but maps to Pennsylvania for region. People search Philadelphia for something in Havertown.
August 21, 2018 at 4:24 pm #443358It is not possible to change the URL structure beyond the options available without a major customization, which we can’t help with here in the forum.
That said, I will flag your question for the developers in case they know of a workaround.
August 21, 2018 at 5:36 pm #443367I am well versed in php. Customization I can probably handle just depends on what all it would effect and what is involved.
If someone can point me in the right direction as to where in the plugin code the permalinks are decoded that would be great. That’s all I need. I don’t need them to provide me every detail in how to do it. I can figure that out.
August 22, 2018 at 11:48 am #443491Hi Doug,
Can you provide example url how you want it? after that i will point you if it is easily possible.
Kiran
August 22, 2018 at 12:29 pm #443494It is also possible that you could try to address this with adding category into the URL.
It is a major customization to alter the URL and again to create archive pages etc, this will touch every aspect of the plugin.
However, categories are already an optional part of the URL.
You might choose categories like “Philadelphia Metro”
August 22, 2018 at 2:47 pm #443535We want to do gamebeast.com/philadelphia/havertown/ice-hockey-clinic.
Basically do host/metro/city/post.
August 22, 2018 at 2:48 pm #443537If I do category would that come before city in the structure?
I think we use categories for the type of post already if it’s a camp, tournament, etc.
August 22, 2018 at 3:29 pm #443550This is not possible: gamebeast.com/philadelphia/havertown/ice-hockey-clinic
What is ‘host’? Is that “Philadelphia’? Or you mean like ‘site.com’/?
I think you mean site.com/philadelphia(metro)/havertown(city)/post-title
Is that right?
And you would want Location and CPT Listing pages for the ‘metro’ areas also?
For categories, yes, they come at the end of the URL, generally speaking.
August 22, 2018 at 5:08 pm #443572You are correct, so your saying no go on this?
August 22, 2018 at 6:37 pm #443592First, eliminating the slug for the CPT (Places) is not possible.
Second, to achieve something like: site.com/places/philadelphia(metro)/havertown(city)/post-title
here, adding in a new ‘admin’ area like ‘metro’ is a customization, for certain, and not something we can help with because truly implementing it would mean touching almost every aspect of the core plugin, a complete rewrite. It is not just URL rewrites that are involved, but queries and the entire scheme for managing locations. Tons of work.
August 23, 2018 at 11:12 pm #443791Got it. Didn’t know there was more involved than just changing the permalink rewrite rules.
August 23, 2018 at 11:13 pm #443792Couldn’t I just do a url rewrite rule from the metro area url to the correct region/city permalink?
August 24, 2018 at 11:57 am #443844That makes me want to ask anew, what are you trying to accomplish?
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket