replacing geo_loc.php into my theme

Home Forums Calendar Products Events Calendar PRO replacing geo_loc.php into my theme

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #997981
    Scott
    Participant

    Where should I place the following file in my theme so I can change template text and not lose them on an update?

    \plugins\events-caledar-pro\src\Tribe\Geo_Loc.php

    I have reviewed the themer’s guide but this particular file I am not sure where to place it.

    Thanks!

    • This topic was modified 8 years, 8 months ago by Scott.
    #998048
    George
    Participant

    Hey Scott,

    You cannot replace that file in your theme – the only files eligible for that templating system are the ones in /src/views/, the files in src/Tribe are core plugin files that will cannot and should not be overwritten.

    I hope that helps clarify things!

    George

    #998095
    Scott
    Participant

    So what options would one have to replace the default placeholder text in the tribe bar without the changes getting wiped by an update?

    #998627
    George
    Participant

    Hey Scott,

    You could do so with some simple JavaScript added to your site via a function in your theme’s (or, even better, your child theme’s!) functions.php file. You can set the “Placeholder” attribute via JavaScript so that should work well.

    Here’s an example:


    add_action( 'wp_footer', 'scott_tribe_placeholder_js' );

    function scott_tribe_placeholder_js() {
    if ( ! wp_script_is( 'jquery', 'enqueued' ) ) {
    wp_enqueue_script( 'jquery' );
    }
    ?>
    <script>
    jQuery(document).ready(function($){
    $( 'input#tribe-bar-date' ).attr( 'placeholder', 'New Placeholder Text' );
    });
    </script>
    <?php
    }

    That would change the placeholder text for the “Date” input to “New Placeholder Text”, for example.

    Play around with that, and if you need help finding the specific HTML names of the input elements whose placeholders you want to adjust, check out a free tool like Firebug if you use FireFox, or the Developer Tools for either Safari or Chrome, which all have “Inspector” tools in them which let you zoom right over the element on the page with your mouse to find out its HTML id and such.

    I’ll close up this thread for now, as you’ll have to take the reins on the rest of your customizing. I hope this helps you get started on that!

    — George

    #1002877
    Support Droid
    Keymaster

    This topic has not been active for quite some time and will now be closed.

    If you still need assistance please simply open a new topic (linking to this one if necessary)
    and one of the team will be only too happy to help.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The topic ‘replacing geo_loc.php into my theme’ is closed to new replies.