Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
- This topic has 5 replies, 3 voices, and was last updated 8 years, 11 months ago by
mcqvtbicrs.
-
AuthorPosts
-
08/13/2014 at 6:56 pm #300820
Mike
ParticipantHi Steve,
Can you help me force the 1-column layout for the connections add/ edit entry admin page?
It works much better in my case for the categories to be full width. They’re very important on my site, and they get a lot of frequent adjustment, so it should be the first option for all users.
This looks great, but I needs it to be the default layout for all users, since I am hiding screen options from users.
Thanks,
MikeAttachments:
You must be logged in to view attached files.08/13/2014 at 7:15 pm #300823Mike
ParticipantI’m wondering if something like this could be used, to bring the categories over to the main column?
<?php function wpse25793_move_post_metaboxes( $post ) { global $wp_meta_boxes; remove_meta_box( 'submitdiv', 'cpt-slug', 'side' ); add_meta_box( 'submitdiv', __( 'Publish' ), 'post_submit_meta_box', 'cpt-slug', 'normal', 'low' ); } add_action( 'add_meta_boxes_cpt-slug', 'wpse25793_move_post_metaboxes' ); ?>
08/14/2014 at 1:30 pm #300894Steven Zahm
Keymaster@ Mike
First, install the Code Snippets plugin.
Add a new snippet with the following code:
add_filter( 'screen_layout_columns', 'cn_screen_layout', 99, 2 ); public static function screenLayout( $columns, $screen ) { // Grab an instance of the Connections object. $instance = Connections_Directory(); /* * The Screen Layout options in the Screen Options tab only needs to be added on the manage page if performing an action to an entry. * This is to prevent the Screen Layout options in the Screen Options tab from being displayed on the Manage * admin page when viewing the manage entries table. */ if ( $screen == $instance->pageHook->manage && ! isset( $_GET['cn-action'] ) ) return $columns; $columns[ $instance->pageHook->manage ] = 1; $columns[ $instance->pageHook->add ] = 1; return $columns; }
Save and activate. This should make the default layout one column.
To move the the category metabox to the other side, yes, you can use similar code to that found on SO.
Add a new snippet with the following code:
function cn_category_metabox() { remove_meta_box( 'categorydiv', 'users_page_connections_link', 'side' ); add_meta_box( 'categorydiv', __( 'Categories', 'connections' ), array( 'cnEntryMetabox', 'category' ), 'users_page_connections_link', 'core', 'normal' ); } add_action( 'load-users_page_connections_link', 'cn_category_metabox' );
This snippet will only affect the Link admin edit entry page … its the one I think you really want to change, yes?
There’s not a really easy way to force position though. Oh, and it will not change the position and placement of users who have already visited the page.
Alternatively, you could probably use jQuery to do it for you. This SO answer provides a basic example which you could adapt to Connections.
I hope that helps!
09/12/2014 at 11:48 am #303724Mike
ParticipantOh, and it will not change the position and placement of users who have already visited the page.
Just to confirm, does that mean that if any user has already visited the “Your Directory Entry” page, these solutions listed above are not valid?
Categories are very important to this installation, so I am hoping to find a way to position that box to the left side, even above the name and organization fields. Do you know of a good way get this solved?
Setting page options to 1-column works well. But I need to avoid the extra step of having users chang escreen options.
09/12/2014 at 1:47 pm #303770Steven Zahm
Keymaster@ Mike
Correct, that is because WordPress has already saved their user preferences for that screen.
The only solution is probably in this StackOverflow answer. This part specifically:
$('#pageparentdiv').prependTo('#normal-sortables');
$('#panel_38').insertAfter('#pageparentdiv');This would involve using the correct metabox ID/ for categories which would be
categorydiv
andmetabox-name
for the Name metabox. YOu when then have to enqueue your little custom script to it is included only on the Connections admin pages to ensure it will not mess with other plugins and core WP.Hope that helps!
10/13/2014 at 3:55 pm #306939mcqvtbicrs
GuestThis reply has been marked as private. -
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.