BuddyDev

Search

How can I best achieve my perfect single photo view?

  • Participant
    Level: Master
    Posts: 459
    Venutius on #55490

    It is not picking up the photo.php template at all, and is just showing a standard image page I reckon – here’s the address it is going to: /gallery/the-yorkshire-dales/media/p1110837. That is not my post link structure.

    I’ll revert to the old version, and see if it is something I’ve done.

  • Keymaster
    (BuddyDev Team)
    Posts: 25010
    Brajesh Singh on #55491

    Hi George,
    I will test with v1 and 2 both and write back in the day today.

    Regards
    Brajesh

  • Keymaster
    (BuddyDev Team)
    Posts: 25010
    Brajesh Singh on #55498

    Hi George,
    The path to overwrite photo.php is your-current-active-theme/mediapress/default/gallery/media/views/photo.php

    Here is a screenshot showing it in twentytwentyfive theme.

    https://i.ibb.co/674SJBJQ/media-photo-php.png

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 459
    Venutius on #55513

    The original template photo.php is not being seen. no matter what option I pick, I just get the wp attachment page.

  • Keymaster
    (BuddyDev Team)
    Posts: 25010
    Brajesh Singh on #55514

    Hi George,
    Can you point me to the url structure(how are you accessing media). You are probably not accessing it via MediaPress views.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 459
    Venutius on #55516

    I’m getting to it 🙂

    Can I suggest the following change to the loading page for all of your MediaPress add-on plugins. It fixes a typo, and inadvertent crashes 🙂

    
    
    //exit if accessed directly
    if ( ! defined( 'ABSPATH' ) ) {
    	exit;
    }
    
    //exit if MediaPress is not loaded
    If ( if ( ! class_exists( 'MediaPress') ) {
    	exit;
    }
    
    
    • This reply was modified 1 week, 2 days ago by Venutius.
    • This reply was modified 1 week, 2 days ago by Venutius.
  • Keymaster
    (BuddyDev Team)
    Posts: 25010
    Brajesh Singh on #55519

    Hi George,
    Thank you for the suggestion. Our new addons already have a compatibility check mechanism(either using function_exists or hooking to mpp_..actions), some of the older do have the issue. We are going through all of our addons, expect around 10 addon updates per month from now on.

    Regards
    Brajesh

  • Participant
    Level: Master
    Posts: 459
    Venutius on #55520

    The link shown in the Gallery Grid view is https://brigantesnation.com/gallery/moulton-henge/media/moulton-henge-1m-lidar1-national-library-of-scotland-2/

    The link address I arrive at once I click this is https://brigantesnation.com/gallery/moulton-henge/media/moulton-henge-1m-lidar1-national-library-of-scotland-2

    But here is the wrap for that image – not an mpp in sight.

    https://brigantesnation.com/wp-content/uploads/2025/06/Screenshot-2025-06-15-204848.png

  • Participant
    Level: Master
    Posts: 459
    Venutius on #55521

    This is the gallery (bottom of the page) I was looking at.

  • Participant
    Level: Master
    Posts: 459
    Venutius on #55522

    I modified the plugin template for shortcode/grod-photo.php

    /**
     *
     * Photo list in shortcode grid view
     * You can override it in yourtheme/mediapress/default/shortcodes/grid-photo.php
     *
     */
    $query            = mpp_shortcode_get_media_data( 'query' );
    $lightbox_enabled = ! empty( $atts['lightbox'] ) ? 1 : 0;
    $lightbox_class   = $lightbox_enabled ? 'mpp-shortcode-lightbox-enabled' : 'zoooom';
    $media_ids        = join( ',', $query->get_ids() );

    This adds my zoom function to the gallery grid view, but if I enable the lightbox, and get nothing, just the attachment page, no lightbox, no description.

You must be logged in to reply to this topic.

This topic is: not resolved