Full width layout for custom post type pages

Since you are using Genesis, why don’t you just use the Layout that doesn’t contain Primary Sidebar? The layout option should be available right below the editor (as a meta box). If you still need code, use plain CSS to remove the sidebar area. function remove_primary_sidebar() { //Only if Pages with the following IDs if … Read more

Multisite Widget/Content

Could you use the admin bar at the top instead? To me short messages look better up there. add_action( ‘admin_bar_menu’, ‘toolbar_link_to_mypage’, 999 ); function toolbar_link_to_mypage( $wp_admin_bar ) { $args = array( ‘id’ => ‘my_admin_bar_text’, ‘title’ => ‘WELCOME TO SYDNEY’, ‘meta’ => array( ‘class’ => ‘my-toolbar-page’ ) ); $wp_admin_bar->add_node( $args ); } Likewise though, you can … Read more

Insert Widget option into mark-up with register_sidebar

First you will replace this line <div id=”%1$s” class=”widget %2$s” data-custom-title=””> with <div id=”%1$s” class=”widget %2$s” data-custom-title=”DCT”> Now add the filter in your functions.php file. add_filter( ‘widget_display_callback’, ‘add_custom_data_to_before_widget’, 10, 3 ); function add_custom_data_to_before_widget( $instance, $widget_class, $args ) { if ( ! empty( $instance[‘title’] ) && ! empty( $instance[‘custom-title’] )) { $args[‘before_widget’] = str_replace(‘DCT’, sanitize_text_field ( … Read more

How to make a widget expand wider than the column width when editing its settings in the admin

This can be set by passing arguments to the $control_options of the parent widget constructor, which is the fourth argument. Here is an example constructor: class Custom_Widget extends WP_Widget { /** * Sets up the widgets name etc */ function __construct() { $widget_options = array( ‘description’ => __( ‘Featured Pages Widget.’, ‘affiliate’ ) ); $control_options … Read more