[gd_add_listing] issue

This topic contains 8 replies, has 3 voices, and was last updated by  Guust 6 years, 3 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #412831

    marktowers
    Buyer
    Post count: 171

    Hi,

    For a long while I’ve wanted to create add listing pages for each CPT (ideally for each package too) so that I can add some text specific to the CPT prior to the form. I have previously added some extra text using a translation file, but this was never satisfactory as the text had to be generic to all CPTs.

    So, I was pleased to find the [gd_add_listing] shortcode in the core shortcodes.

    I have used the [gd_add_listing] place to create add listing pages for each CPT (which have to be manually added to site navigation), but unfortunately I have experienced a few issues. Note, as per the instructions on the core shortcode page I initially permanently deleted the add-listing page.

    After doing this I was able to go to my new add CPT listing pages (e.g. website.co.uk/add-place/ or website.co.uk/add-event/) and they would display fine (i.e. any text specific to the particular CPT listing followed by the respective submission form.)

    However, when I tried to either add a new listing from the dashboard widget or edit/upgrade a listing from the dashboard it would not work.

    I figured it was because it was because there was no permalink page. So, I added a replacement permalinked add listing page (I called this page “listing”) which did not have the shortcode (as suggested in other support articles.)

    Whilst this now allowed me to add/edit/upgrade from the dashboard (and dashboard widget) the new CPT add listing pages were now no good because whilst I could still go to the CPT specific add listing pages they no longer showed specific CPT content included in the CPT specific add listing pages.

    I would appreciate your advices on how I can get this to work as I’m not sure what I’m doing wrong.

    Let me know if you need any log-in details etc.

    Thanks.

    #412841

    Alex Rollin
    Moderator
    Post count: 27815

    Hello Mark,

    There are a couple ways to achieve custom text through customization of your site.

    The least complicated way is to edit the package titles, the next is to translate existing text and change it to what you want.

    You can also try the Sidebar, and use widget logic to show a sidebar based on the URL.

    The most complex way also gives you the most control, which is to customize the add-listing.php page. You or your developer could modify that template add an extra widget area on top of the add listing page before the ###### MAIN CONTENT ###### section.

    https://wpgeodirectory.com/docs/customizing-geodirectory-templates/

    There are also additional posts in the forum like this one: https://wpgeodirectory.com/support/topic/adding-text-to-the-add-listing-page/

    #412874

    marktowers
    Buyer
    Post count: 171

    Hi Alex,

    It’s probably a good idea for me to rephrase as different questions.

    1) If I want to have a different Add Listing page for each CPT should I still have a different page selected as a permalink (which would be selected for “Add listing page” on website.co.uk/wp-admin/admin.php?page=geodirectory&tab=permalink_setting)?
    2) If it is necessary to have a permalinked add listing page can this page be called whatever we wish to call it, or should it still be called “add-listing”?
    Q3 or Q4 dependent on answer to Q1
    3) If we don’t have to have a permalink for “add listing page” then how can the issue of the dashboard/dashboard widget links not working be fixed?
    4) If we do have to have a permalink for “add listing page” then is there any point creating different Add Listing pages if they don’t show anything different to the default all listing page? I would’ve thought the purpose of creating different ads listing pages would be for them to be different on each add listing page. If the only thing that differs is the form then we may as well stick with the default add listing page as the form is different per CPT on there already.

    Hope this clarifies my query a bit better.

    Thanks.

    #412882

    Guust
    Moderator
    Post count: 29970

    1. Permalink is not required then at GD > Permalinks, because you no longer are using the default Add Listing page. You will need to add all links to the new pages manually.

    2. See 1.

    3. You will have to give other links, and cannot use the dashboard links anymore. Remove them from GD > Design > Navigation

    4. Whatever is added from the system will be the same, it is just that you can add different content above the shortcode.

    This may be a simpler solution for you: https://wpgeodirectory.com/docs/common-code-snippets/#add-listing

    Let us know if I misunderstood anything. Thanks

    #413063

    marktowers
    Buyer
    Post count: 171
    This reply has been marked as private.
    #413065

    Guust
    Moderator
    Post count: 29970

    Why do you not just add the GD Login widget to the author page, then you have all the links as you want them?
    I don’t understand the problem about the edit and renew links. Why is a link that works as intended a problem?

    Maybe have a look at UsersWP where you have more control over the author/dashboard/profile page.

    #413145

    marktowers
    Buyer
    Post count: 171
    This reply has been marked as private.
    #413199

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    Thanks for writing in with more details now about what you want to do. Now I think we understand what you are trying to do, but it is a customization.

    This is not a bug with the add listing shortcode. The plugin is designed to work with the add listing page and the permalink for add-listing is a critical part of the operation.

    If you unset the permalink and insist on leaving it that way, then, you must customize more than just the add-listing.php template, you must also open up all the redirection and indeed the entire logic for the add listing process.

    This kind of customization is far outside of what we can help you with here in support. What we can do is point out the add listing code snippet, to add custom text based on the CPT type https://wpgeodirectory.com/docs/common-code-snippets/#add-listing

    As you can see in your examples above, the problem is not just getting a dynamic link into the menu, it is also that the links themselves don’t work without the add-listing page permalink setting. The same applies to the links for renewal and upgrade. Those too are dependant on the add listing page being set.

    If you set the add-listing page url, then you can use the snippet to deliver your custom text per CPT, and you can avoid all the work with the customization. You can then either add the navigation menu settings back in to power the widget links, or you can make custom menu links to the individual pages, those are the options available without customization, but they only work if the add listing permalink is set.

    If you decide to proceed with the customization, you will still need to set the add listing page and probably alter the template, plus override at least 3 different functions, and for that you would again be outside what we can help you with here in support.

    #413216

    Guust
    Moderator
    Post count: 29970

    Hi Mark, my mistake for answering without testing, I was sure you did not need a page at GD > Permalinks > Add Listing.
    Well, I was wrong, you do need a page selected there, it just cannot be the default Add Listing page.
    I create a new blank page and added it at GD > Permalinks > Add Listing. Please check now.

    Sorry for the trouble, I should have tested before speaking.

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

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

Open Support Ticket