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
  • Author
    Posts
  • #443260

    Doug Rooney
    Expired Member
    Post count: 22

    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.

    #443281

    Alex Rollin
    Moderator
    Post count: 27815

    Hello Doug,

    is ‘metro’ a custom field?

    Have you already tried ‘region’ and that isn’t what you are looking for?

    #443346

    Doug Rooney
    Expired Member
    Post count: 22

    It’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.

    #443358

    Alex Rollin
    Moderator
    Post count: 27815

    It 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.

    #443367

    Doug Rooney
    Expired Member
    Post count: 22

    I 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.

    #443491

    Kiran
    Moderator
    Post count: 7069

    Hi Doug,

    Can you provide example url how you want it? after that i will point you if it is easily possible.

    Kiran

    #443494

    Alex Rollin
    Moderator
    Post count: 27815

    It 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”

    #443535

    Doug Rooney
    Expired Member
    Post count: 22

    We want to do gamebeast.com/philadelphia/havertown/ice-hockey-clinic.

    Basically do host/metro/city/post.

    #443537

    Doug Rooney
    Expired Member
    Post count: 22

    If 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.

    #443550

    Alex Rollin
    Moderator
    Post count: 27815

    This 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.

    #443572

    Doug Rooney
    Expired Member
    Post count: 22

    You are correct, so your saying no go on this?

    #443592

    Alex Rollin
    Moderator
    Post count: 27815

    First, 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.

    #443791

    Doug Rooney
    Expired Member
    Post count: 22

    Got it. Didn’t know there was more involved than just changing the permalink rewrite rules.

    #443792

    Doug Rooney
    Expired Member
    Post count: 22

    Couldn’t I just do a url rewrite rule from the metro area url to the correct region/city permalink?

    #443844

    Alex Rollin
    Moderator
    Post count: 27815

    That makes me want to ask anew, what are you trying to accomplish?

Viewing 15 posts - 1 through 15 (of 15 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket