Add container to nav_menu sub menu

Use a custom walker, extend the methods start_lvl() and end_lvl. Sample code, not tested: class WPSE_78121_Sublevel_Walker extends Walker_Nav_Menu { function start_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat(“\t”, $depth); $output .= “\n$indent<div class=”sub-menu-wrap”><ul class=”sub-menu”>\n”; } function end_lvl( &$output, $depth = 0, $args = array() ) { $indent = str_repeat(“\t”, $depth); … Read more

How to Add Image to WordPress RSS-Feed with no Plug-in?

Here is a great example. How to display featured post thumbnails in WordPress feeds paste this code snippet in your theme functions.php file // display featured post thumbnails in WordPress feeds function wcs_post_thumbnails_in_feeds( $content ) { global $post; if( has_post_thumbnail( $post->ID ) ) { $content=”<p>” . get_the_post_thumbnail( $post->ID ) . ‘</p>’ . $content; } return … Read more

File not found.