How to override general.php function with functions.php

Home Forums Calendar Products Events Calendar PRO How to override general.php function with functions.php

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #138751
    aling
    Participant

    Hello-
    I’m trying to overwrite this function: tribe_event_featured_image by removing the $image_src line. I copied the whole function into the functions.php file and left the $image_src = ” and where I just removed that line completely but when I refresh my page, it shows up as a blank white page.

    Can someone tell me how to overwrite it?

    #139032
    Casey
    Participant

    aling,
    Thanks for getting in touch! I’m not exactly sure why you’d want to remove line 776, as that’s where the featured image is actually retrieved from WordPress. Could you tell me a little more about what you’re trying to accomplish, so I can determine the best way to assist? Thanks! πŸ™‚

    -Casey-

    #139078
    aling
    Participant

    Hi Casey!
    Thanks for getting back to me. Basically I wanted to remove that for view on the individual events page because I’m using the featured image as a “thumbnail” image for the homepage carousel. I will have a larger image in the content area itself and I do not want to be able to view both images. I prefer the content image over the featured image.

    Hope that makes sense.

    Amy

    #139323
    Casey
    Participant

    Amy,
    First, you’ll want to take a look at our themer’s guide to see how to perform template overrides. Then, you should just be able to override ‘views/single-events.php’ and remove the line that says the following:


    <?php echo tribe_event_featured_image(); ?>

    That will remove the featured image from your single event view. I hope that helps get you pointed in the right direction. Thanks! πŸ™‚

    -Casey-

    #154859
    Casey
    Participant

    I just wanted to follow up and see if you’re all set here or if you still have further questions. Just let me know if you have further questions or if I should go ahead and close out this thread. Thanks! πŸ™‚

    -Casey-

    #155232
    aling
    Participant

    Thanks Casey-

    I haven’t had time to play around as I’ve been busy but will look more into it when I get a chance.

    Thanks!
    Amy

Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘How to override general.php function with functions.php’ is closed to new replies.