Overriding functions

Bring Your Business to LifeSupportImage StoreOverriding functions

Tagged: 

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #452342
    johnh
    Participant

    I disabled ‘Show photo links’ but sadly whilst the gallery shows as a slideshow, the favorites does not. However, I found that by making a very small change to the gallery_shortcode function in store.php I could fix this and easily get the favorites to show in a slideshow as well. My problem is that I don’t want to make changes to the core code and really need to override that function in my themes function.php file but can’t find a suitable hook.

    Can you please tell me if it is even possible to override this function, and if so what hook I should use?

    Thank you.

    #453395
    Xpark Media
    Keymaster

    This is the settings that you should use. There is no need to use a hook to make that modification.

    Please let us know if you still have problems.

    Screen Shot 2015-12-05 at 12.12.49 AM

    #454573
    johnh
    Participant

    I think you may have missed something when you read my original post.

    Your suggestion works fine for the gallery page but not the favorites page, which always shows the photo gallery and not a slideshow regardless of the settings for ‘Show photo links’. If you look at the gallery_shortcode function in store.php you will see that it cannot do anything else as it is currently coded.

    That’s why I need to know the hook to overwrite this function. Or will you be fixing this bug in a later release?

    Thanks.

    #454799
    Xpark Media
    Keymaster

    @johnh,

    This is not a bug, it is by design. The slideshow is only for presentation and the favorites pages is displayed always as a grid.

    You could use the “ims_before_galleries” filter to change the display. Include the favorites layout by using

    include( IMSTORE_ABSPATH . '/_store/slideshow.php' );

    #455566
    johnh
    Participant

    Many thanks.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.