Modifying the output of class-geodir-widget-post-title.php

This topic contains 5 replies, has 3 voices, and was last updated by  summercamps 5 years, 5 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #498954

    summercamps
    Full Member
    Post count: 14

    I need to modify the output of the title/link on GD Archive Item template so that it doesn’t output a link for particular package_id’s

    My V1 site used conditional logic like this, in the listing-listview.php template and in a function on for the detailed page:
    IF ( $post->package_id != ‘6’) { //do something }

    How can I apply similar logic to the output of the [gd_post_title tag=’h2′] shortcode? I found this filter: geodir_widget_gd_post_title_tag but that’s not getting me what I need. Is there a hook? Thanks.

    #498994

    Alex Rollin
    Moderator
    Post count: 27815

    You can customize just that widget, that might be your best bet if you don’t want to go further and create a new listing-listview.php (now called content-listing.php)

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

    #500392

    summercamps
    Full Member
    Post count: 14

    Thanks. I built a new shortcode to handle the conditional output of the various [gd_post_badge]

    I have a related question. I need onlick added to each of these badges to continue the event tracking we have been using in GA. Is it possible to pass these via the shortcode (we use Title, ID, post_author values)?

    #500421

    Alex Rollin
    Moderator
    Post count: 27815

    Good question. I will flag that for the developers to let us know if that is possible.

    #500425

    Stiofan O’Connor
    Site Admin
    Post count: 22956

    Not sure where you are using these but you could use the function direct and add the noclick argument with the info you need. https://github.com/AyeCode/geodirectory/blob/master/includes/post-functions.php#L723

    Stiofan

    #500639

    summercamps
    Full Member
    Post count: 14

    Thank you. I ended up creating custom shortcode functions that included our conditional logic plus the event tracking.

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
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount