How do I add nested categories to drop-down menu in twenty-eleven?

As a purely theory example, this is how I would approach the problem: $cats = get_categories(); echo ‘<ul>’; foreach($cats as $cat) { echo'<li>’.$cat->name; if($cat->parent != 0) { $subcats = get_category(‘child_of=”.$cat->cat_ID; echo “<ul>’; foreach($subcats as $subcat){ echo ‘<li>’.$subcat->name.'</li>’; } } echo ‘</li>’; } echo ‘</ul>’; I don’t expect that to work fully as I coded it … Read more

Is “Featured Content” in Twenty Fourteen done with a plugin, or is it native in WP4.0?

The featured content is part of the TwentyFourteen theme, and is not implemented as a plugin, but rather as an Appearance > Customize setting (via get_theme_mod()), which allows the use of a Grid or Slider layout, choosing posts base on the tag provided. BTW, I figured this out only after reading your post! So thanks … Read more

How to enable edit button in the theme’s customize UI?

I just had the same issue and with a little googling I found the following solution: // Add the selective part $wp_customize->selective_refresh->add_partial( ‘your_theme_second_logo’, array( ‘selector’ => ‘#yourID’, // You can also select a css class ) ); After you add the custom settings, you need to tell to WordPress what settings you want to manage … Read more

All shortcodes not working on custom theme

So I finally found a solution!!! After many weeks of searching and trying different solutions, it was just a matter of removing “get_” from a reference of “the_content” in my page.php I changed this <?php function sup($text){ $true = preg_replace(‘#(\d+)(st|th|nd|rd)#’, ‘$1<sup class=”super”>$2</sup>’, $text); return $true; } echo sup(get_the_content()); ?> To this <?php function sup($text){ $true … Read more

Is there an easy way to separate themes on network?

You’d have to make you site categories slug match your theme categories folder names. Here’s how to filter themes: Hide a theme on list of themes in wp-admin without editing core files And then, supposing a site has the category a-p and the themes are stored in themes/a-p/, this will filter them out: add_filter( ‘all_themes’, … Read more

Is having multiple theme customizers for different pages possible?

This is not a complete solution and the code is not tested, but I it should be enough to give you a general idea of how to use the customizer for different pages. // Add “Edit page with customizer” link to relevant pages add_action(‘admin_bar_menu’, function($bar) { if (is_home()) { $bar->add_node(array( ‘id’ => ‘some-id-1’, ‘title’ => … Read more

Reordering themes in admin panel

The get_themes function passes the available themes to the theme list table class and is hardcoded with a call to asort the array, with no filters available anywhere along the way that i can see. So in short, not possible at present due to an absence of hooks(at least as far as my observations go). … Read more

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