How to create and populate with few links a menu in child theme functions.php?

Here you go. Since you already have the menu-id all you need is: $menu_item_defaults = array( ‘menu-item-db-id’ => $menu_item_db_id, ‘menu-item-object-id’ => 0, ‘menu-item-object’ => ”, ‘menu-item-parent-id’ => 0, ‘menu-item-position’ => 1, ‘menu-item-title’ => ‘Play Game’, ‘menu-item-url’ => ”,//not sure is a blank is ok here ‘menu-item-description’ => ”, ‘menu-item-attr-title’ => ”, ‘menu-item-target’ => ”, ‘menu-item-classes’ … Read more

Disable post thumbnails in Twenty Thirteen child theme

How can we force has_post_thumbnails() to return false? Method #1 – disable theme support: You can remove the post thumbnails support from the backend, with function twentythirteen_child_setup() { remove_theme_support( ‘post-thumbnails’ ); } add_action( ‘after_setup_theme’, ‘twentythirteen_child_setup’, 11 ); but notice that this will not remove the featured images. If the _thumbnail_id post meta value is non-empty, … Read more

No responsive design is displayed

Well, it was my fault. I had added a media-query to style.css and I put: @media (min-width: 1300px) { h2.site-description { margin-top: 130px; } That is to say, I forgot a bracket. It should be: @media (min-width: 1300px) { h2.site-description { margin-top: 130px; } } That broke all my next css properties.

Menu item added in wp_nav_menu_items filter is never highlighted

@AlexanderFarber, there are many way to attach attribute class under wp_nav_menu link. I agree with @Sumit, adding page links in Appearance > Menu WordPress take care of current-menu-item class or current_page_item class. Also, this way is best practice to handle your nav menu in the future. Create dynamic link in wp_nav_menu Since your question related … Read more

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