Would like to Edit some Core plugin PHP

This topic contains 8 replies, has 3 voices, and was last updated by  Alex Rollin 5 years, 7 months ago.

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

Open Support Ticket
  • Author
    Posts
  • #448788

    Mongkol Jaemjaeng
    Expired Member
    Post count: 13

    Hi i made an edit @ some core plugin php file such as
    listing-listview.php
    Example
    <?php
    /**
    * Called before the post excerpt on the listings view template.
    *
    * @since 1.0.0
    * @param object $post The post object.
    * @see ‘geodir_after_listing_post_excerpt’
    */
    do_action(‘geodir_before_listing_post_excerpt’, $post); ?>
    <?php echo geodir_show_listing_info(‘listing’); ?>

    I start make comment from this

    <!– <div class=”geodir-entry-content”>

    <?php
    /**
    * Filter to hide the listing excerpt
    *
    * @since 1.5.3
    * @param bool $display Display the excerpt or not. Default true.
    * @param string $view The view type, default ‘listview’.
    * @param object $post The post object.
    */
    $show_listing_excerpt = apply_filters(‘geodir_show_listing_post_excerpt’, true, ‘listview’, $post);
    if ($show_listing_excerpt) {
    if ( isset( $character_count ) && ( $character_count || $character_count == ‘0’ ) ) {
    $content_out = geodir_max_excerpt( $character_count );
    } else {
    $content_out = get_the_excerpt();
    }
    if ( ! empty( $content_out ) ) {
    echo “<p>” . $content_out . “</p>”;
    }
    }
    ?></div> –> my End comment

    INTO these :

    <div class=”geodir-entry-content”> <?php $check_button= $post->geodir_Button_enable; if($check_button){ echo “<span class=’glf-button’ data-glf-cuid=”,$post->geodir_CUID,” data-glf-ruid=”,$post->geodir_RUID,” data-glf-auto-open=’false’>ORDER NOW</span><script src=’https://www.foodbooking.com/widget/js/ewm2.js’ defer async ></script>”; } ?></div>

    by edit core php file directly it make me can’t update my geodirectory plugin

    Would you please suggest me another to edit php file but not in core file directly ?

    #448813

    Kor
    Moderator
    Post count: 16516

    Hi Mongkol,

    Thanks for your post. Could you tell us a little bit more about what are you trying to achieve there? Maybe we could do what you needed there using some filters.

    Thanks!

    #448836

    Alex Rollin
    Moderator
    Post count: 27815
    #448876

    Mongkol Jaemjaeng
    Expired Member
    Post count: 13

    on the search result or Listing place in each shop there ‘s shop’s description i would like to delete it and put order now button instead of that.

    #448885

    Kor
    Moderator
    Post count: 16516

    Hi mongkol,

    You can try creating a “Custom Field URL” as explained here https://wpgeodirectory.com/docs/core-place-settings/#url and display it on the listings using this method https://wpgeodirectory.com/docs/core-place-settings/#show . Could you give it a try?

    Thanks!

    #449272

    Mongkol Jaemjaeng
    Expired Member
    Post count: 13

    alex rollin and Kor
    I Try custom @ templates so far now it’s work!
    Thx

    #449297

    Alex Rollin
    Moderator
    Post count: 27815

    Excellent 🙂

    #450213

    Mongkol Jaemjaeng
    Expired Member
    Post count: 13

    Hi it’s me again I have some question About tip your guys show me before about
    https://wpgeodirectory.com/docs/customizing-geodirectory-templates/

    Are this method limit only geodirectory-Templates file?
    i mean “Can i create directory ‘Geodirectory’ in child-theme and copy any file in geodirectory then modify it then put it in folder @ child-theme and it work ?”

    #450269

    Alex Rollin
    Moderator
    Post count: 27815

    I am not sure I understand the question. That sounds like what is described on the linked page.

    Navigate to your child theme.
    Create a folder in your active child theme folder called geodirectory.
    Find the template you want to customize.
    And copy that template to the geodirectory folder in your active child theme.

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

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