BuddyDev

Search

Replies

  • Participant
    Level: Master
    Posts: 475

    Thanks Brajesh that works great! I added a check to exclude the site admin and all is working exactly how I want it.

  • Participant
    Level: Master
    Posts: 475

    Thanks Brajesh

  • Participant
    Level: Master
    Posts: 475

    Oops sorry, I meant to say they would be uploading from the front-end.

  • Participant
    Level: Master
    Posts: 475
    Venutius on in reply to: Categories for media #12940

    Hi Brajesh,

    Thanks for looking at this and I hope you are able to come up with a solution. most of the sites I look after use a combination of private and public media galleries and I’d certainly like to improve the visibility of the media for all users whilst maintaining the preferred privacy of the content owners.

  • Participant
    Level: Master
    Posts: 475
    Venutius on in reply to: Categories for media #12923

    Hi Brajesh, thanks for looking at this.

    1. These are audio files stored in a MediaPress group gallery, set to only display to group members.
    2. ‘music’
    3. No

    I’m off out now, won’t be back till this evening.

  • Participant
    Level: Master
    Posts: 475
    Venutius on in reply to: Categories for media #12910

    I tried changing is_search() to is_archive() but this caused all the private music files to be publicly visible.

  • Participant
    Level: Master
    Posts: 475
    Venutius on in reply to: Categories for media #12909

    Actually, what I did seems to have broken all the security for the site, the bands private audio files started showing up in a lot of listings that the public can see, here’s the code I added, is it wrong?

    function wpmt_search_filter($query) {
    if ($query->is_search() && $query->is_main_query() || is_archive() )  {
    $query->set('post_status', array( 'publish', 'inherit' ));
    $query->set( 'post_type', array( 'post', 'attachment' ) );
    }
    return $query;
    }
    
    add_filter('pre_get_posts','wpmt_search_filter');
  • Participant
    Level: Master
    Posts: 475
    Venutius on in reply to: Categories for media #12908

    If I have them on a custom taxonomy I can set up a different taxonomy widget and hide that from the public

  • Participant
    Level: Master
    Posts: 475
    Venutius on in reply to: Categories for media #12907

    One of the reasons why I’d rather not use category as the taxonomy for audio items is that the band already use category for their blobs, so I have to show the category widget in the sidebar and unfortunately adding category to audio items causes them to be displayed to the public, clicking on them allows any not logged in user to be able to play these “group only” files.

  • Participant
    Level: Master
    Posts: 475
    Venutius on in reply to: Categories for media #12906

    Hi brajesh,

    Thanks for the tip, it’s now finding the category lookup. However I’d really like to get my custom taxonomy ‘music’ to work. right now it is coming up with a not found error – looking for the page http://www.site.com/music/track I thought this might be because I don’t have a music.php template so I created on but unfortunately that’s not working, any ideas?