Vertical Sidebar Menu Parent and Child not displaying correctly [closed]

Add this to your function.php file: function hierarchical_submenu_get_children($post, $current_page) { $menu = null; // Get all immediate children of this page $children = get_pages(‘child_of=” . $post->ID . “&parent=” . $post->ID . “&sort_column=menu_order&sort_order=ASC’); if ($children) { $menu = “\n<ul>\n”; foreach ($children as $child) { // If the child is the viewed page or one of its … Read more

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

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)