How to create and set a separate template file for articles in Genesis framework? (WordPress)

You can use this… <?php get_header(); ?> <?php genesis_before_content_sidebar_wrap(); ?> <div id=”content-sidebar-wrap”> <?php genesis_before_content(); ?> <div id=”content” class=”hfeed”> <?php genesis_before_loop(); ?> <?php genesis_loop(); ?> <?php genesis_after_loop(); ?> </div><!– end #content –> <?php genesis_after_content(); ?> </div><!– end #content-sidebar-wrap –> <?php genesis_after_content_sidebar_wrap(); ?> <?php get_footer(); ?> CHange this line: <?php genesis_loop(); ?> To whatever loop you need … Read more

Hard-coding a shortcode as the last menu item in primary navigation?

add_filter(‘wp_nav_menu_items’,’my_item’, 10, 2); function my_item($items, $args) { $items .= ‘<li class=”myclass”>whatever</li>’; return $items; } If you have a specific theme location for menu you can target it with : if( $args->theme_location == ‘mylocation’ ) EDIT I you can try $items .= ‘<li class=”myclass”>’ . echo do_shortcode(‘[shopping_cart]’) . ‘</li>’; but it will work only if the … Read more

Excluded category from loop

Can’t really help with custom Genesis code, but the WordPress way to modify the main loop is to filter pre_get_posts. To exclude Category ID 7 from contexts other than single post pages: function wpse72961_filter_pre_get_posts( $query ) { if ( is_main_query() && ! is_singular() ) { $query->set( ‘category__not_in’, 7 ); } return; } add_action( ‘pre_get_posts’, ‘wpse72961_filter_pre_get_posts’ … Read more

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