add php content before comments

This topic contains 5 replies, has 2 voices, and was last updated by  Alex Rollin 4 years, 9 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #505180

    evocativemedia
    Expired Member
    Post count: 28

    Is there a hook I can access to add php content to a (custom) post detail page? I have a custom post type ‘gd_blog’ to which I want to add custom php content between the content constructed using shortcodes and the comment section..

    I can’t find a template to override in the ‘templates’ besides ‘reviews.php’ which appears (quite obviously) to concern review comments only..

    #505189

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    You can edit the GD Detail template for GD V2 with shortcodes, directly.

    See the video here for more information: https://wpgeodirectory.com/docs-v2/templates/details/

    #505285

    evocativemedia
    Expired Member
    Post count: 28

    Yes I know all that, it does not enable me to put custom php code somewhere. So I’ll repeat myself:

    I want to add php code between the content constructed using shortcodes and the comment section on a details page. Is there a hook like ‘before_comments’ or something?

    #505318

    Alex Rollin
    Moderator
    Post count: 27815

    You can override the details template, certainly. Instructions for customizing are here:

    https://wpgeodirectory.com/docs-v2/faq/customizing/

    You could also just create your custom function as a shortcode and then add it to the tabs

    https://wpgeodirectory.com/docs-v2/places/tabs/

    Comments are part of the tabs. GDV2 is all about making it easier to insert that sort of thing.

    #505494

    evocativemedia
    Expired Member
    Post count: 28

    Superb Alex, the custom shortcodes work like a charm!

    Thank you very much for your help.

    #505540

    Alex Rollin
    Moderator
    Post count: 27815

    Ah, that’s great! Easy to use, too!

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

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

Open Support Ticket