BuddyDev

Search

[Resolved] mpp-core.css for mediapress inside theme

  • Participant
    Level: Initiated
    Posts: 6
    Razor KHan on #12305

    Hi there,

    First of all, thanks a million for your amazing mediapress plugin. It’s really freaking awesome.

    I have installed the plugin in my localhost. It works fine. I need some help regarding the following:

    CSS: How do I manage mpp-core.css in my theme. In case of buddypress, I have buddypress.css file in my theme — my-theme/buddypress/css/buddypress.css and buddypress plugin picks css from my theme. I need to do something like that so the mediapress plugin will pick mpp-core.css from my theme directory.

    Looking forward to hearing from you guys.

    Regards
    razor

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #12326

    Hi Razor,
    Thank you for posting this.

    It is part of our plans to move the mpp-core.css/mpp-pure in the overridable location.

    The problem is currently it contains both the structural as well as presentational css. We need to separate structural from presentational and then we can move. It is going to take time.

    For now, if you want I can help with unregistering the styles and re registering/loading from your theme.

    Or better, if you only need partial overriding, Please override the selector using css selector priority.

    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    Razor KHan on #12347

    Hi Brajesh,

    I think for now it would be great to un-register the file from the plugin and re-register it from the theme. I will copy the css file from the plugin and work with it in the theme. Let me know how do I do that?

    Also, Gallery tab in the bp_get_displayed_user_nav() comes at last before the “settings” tab. Your plugin is so important so I want to move it in the third place. Activity, Profile, Gallery, Friends ….. so on.

    I can re-order the BP profile nav by accessing the $bp global variable.

    global $bp
    $bp->bp_nav[‘activity’][‘position’] = 5;
    $bp->bp_nav[‘profile’][‘position’] = 10;
    $bp->bp_nav[‘Friends’][‘position’] = 15;

    I tried with the Gallery same way, but it doesn’t seem to work. Any help regarding this would be great.

    Thank you so much for your support.

    Regards

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #12349

    Hi Razor,
    You may use the following code to unload core css.

    
    
    /**
     * Dequeue core css.
     */
    function mpp_custom_dequeue_core_css() {
    	wp_dequeue_style( 'mpp-core-css' );
    	//wp_dequeue_style( 'mpp-extra-css' );// uncomment it to dequeue the grid framework.
    }
    add_action( 'mpp_enqueue_scripts', 'mpp_custom_dequeue_core_css', 11 );
    
    

    The code you have posted for reordering is for legacy version of BuddyPress and it should be avoided after BuddyPress 2.6.0

    Please see this post
    https://buddydev.com/buddypress/reordering-buddypress-user-profile-tabs/

    For reordering the nav menu. In the place of component, you can use ‘mediapress’.

    Hope that helps.
    Regards
    Brajesh

  • Participant
    Level: Initiated
    Posts: 6
    Razor KHan on #12351

    Hi Brajesh,

    Thank you so much. I will send you a link of my theme when it’s complete and live.

    You are awesome !!!!

    Cheers

  • Keymaster
    (BuddyDev Team)
    Posts: 24623
    Brajesh Singh on #12359

    Thank you Razor.

    I am looking forward to see your theme soon. All the best 🙂

    Cheers
    Brajesh

The topic ‘ [Resolved] mpp-core.css for mediapress inside theme’ is closed to new replies.

This topic is: resolved