Navigation
This is archived content. Visit our new forum.

Tagged: 

  • Author
    Posts
  • #1324841
    V
    Participant

    I don’t know whether this falls under third party software, but it seems to be an x theme portfolio peculiarity.

    I’m using the menu swapper plugin to assign a menu to all pages except the single portfolio pages (which don’t accept the metabox from menuswapper). So given that each page can be assigned a menu except the portfolio pages, the “all other pages” option on ubermenu should assign ubermenu to the remaining portfolio pages, correct? But it doesn’t. Is there something I can do to rectify this?

    Thanks in advance.

    #1325121
    Lely
    Moderator

    Hi There,

    Would you mind providing us with login credentials so we can take a closer look on your settings? To do this, you can make a post with the following info:

    – Link to your site
    – WordPress Admin username / password

    Don’t forget to select Set as private reply. This ensures your information is only visible to our staff.

    #1325556
    V
    Participant
    This reply has been marked as private.
    #1326193
    Rad
    Moderator

    Hi there,

    The menu swapper will only replace the theme location and not the actual menu, and in your portfolio, the primary theme location is replaced by the same primary theme location. Hence, there will be no change. Try replacing it with different theme location where a different menu is assigned.

    Thanks!

    #1329419
    V
    Participant

    Unfortunately, I’m not able to assign a theme location to the single portfolio pages themselves so the “all other pages” setting seems like it would cover this problem.

    However, I set a separate theme menu instance for every menu but am still having the same issue.

    It might be easier if there was access to a Menu Swapper meta box for the single portfolio view as is available for the general portfolio view. Does Renew’s setting both general and single portfolio views from the same “content-portfolio.php” file mean the meta box can only show up in one view or the other? Or is there a way the code may be tweaked to show one for the single view too?

    Or am I still misunderstanding and missing something?

    #1329645
    Rad
    Moderator

    Hi there,

    Ah, you mean when editing the single portfolio page and there is no Menu Swapper meta box. That’s because the plugin was made to work on default post types only (eg. Page and Post). It doesn’t work on custom post types. You should contact the plugin author, maybe they could enable it per post types.

    Thanks!

    #1329855
    V
    Participant

    Ah, thank you. I was hoping that the setting “other pages” would cover menus not set by Menu Swapper. Pity that didn’t work. If an answer is received by the authors of the plugin, I’ll post it here too.

    #1329863
    Christopher
    Moderator

    You’re welcome.

    #1330328
    V
    Participant

    Unfortunately, the comment option is broken on sevenspark.com and without a license, I have no way to contact the author directly.

    However, on this link, the code below was suggested to be placed in the functions.php file in the child theme. This was supposed to allow a meta box on custom pages like a portfolio page.

    Of course, ‘portfolio’ would actually be ‘x-portfolio’, but X theme’s functions are organized a little differently so this didn’t work. Any suggestions?

    function my_add_mswp_post_type( /* array */ $post_types ){
     
        $post_types[] = 'portfolio'; // 'portfolio' is the custom post type ID
        //$post_types[] = 'download'; // this is how you would add a second custom post type
     
        return $post_types;
    }
    add_filter( 'mswp_post_types', 'my_add_mswp_post_type' );
    #1330562
    Rue Nel
    Moderator

    Hello There,

    Thanks for updating in! Have you tried this?

    function my_add_mswp_post_type( /* array */ $post_types ){
     
        $post_types[] = 'x-portfolio'; 
     
        return $post_types;
    }
    add_filter( 'mswp_post_types', 'my_add_mswp_post_type' );

    Please let us know if this works out for you.

    #1331368
    V
    Participant

    Ah, ok. It looks as if I might have misplaced a comma when I changed the ‘portfolio’ to ‘x-portfolio’. Your version worked perfectly, Rue. Thanks.

    #1331371
    Nico
    Moderator

    Happy to hear that.

    Feel free to ask us again.

    Thanks.

  • <script> jQuery(function($){ $("#no-reply-1324841 .bbp-template-notice, .bbp-no-topic .bbp-template-notice").removeClass('bbp-template-notice'); }); </script>