Organizing by super-categories (or nested categories)?

Hi @NealWalters: This is obviously more of an opinion question rather than a technical one but here’s my opinion. My advice: use no more than 10 categories. Those <=10 categories when viewed together should define the essence of your blog. Don’t use subcategories. Then use lots of tags to define the topics you are talking … Read more

WordPress wp_nav_menu within iFrame

To get a working nav menu WordPress needs to be set up complete. My suggestion is to use add_feed(). Ignore the name, you get text/html as output. Let’s start with code <?php # -*- coding: utf-8 -*- /* Plugin Name: T5 Iframe Nav Menu Description: Display a nav menu in an iframe. Version: 2012.05.18 Refresh … Read more

List parent item with all child item on child pages

function wpb_list_child_pages() { global $post; $parent = “”; if ( is_page() && $post->post_parent ) { $parent = wp_list_pages( ‘title_li=&include=” . $post->post_parent . “&echo=0’ ); $childpages = wp_list_pages( ‘sort_column=menu_order&title_li=&child_of=” . $post->post_parent . “&echo=0’ ); } else { $childpages = wp_list_pages( ‘sort_column=menu_order&title_li=&child_of=” . $post->ID . “&echo=0’ ); //$parent = $post->post_title; } if ( $childpages ) { $string … Read more

Can we have a php “page” without a WordPress “page”?

Well, inside your directory just keep a normal php file like my-page.php, and then create a vanity URL for it using .htaccess. Open your .htaccess file (if present in the nstallation directory) or create one RewriteEngine On RewriteRule ^my-page-slug my-page.php Should be good update if you want to access WP posts and other objects, you … Read more

How to create different menu’s for not logged in visitors and for logged in members?

You can do that by using 2 different menus (wp_nav_menu). use is_user_logged_in conditional tag and apply a different menu accordingly: if (is_user_logged_in()) { wp_nav_menu(array(‘theme_location’ => ‘logged_user’ )); } else { wp_nav_menu(array(‘theme_location’ => ‘new_user’ )); } Edit This code goes where you’d usually put your regular menu in the theme – probably header.php Also, make sure … Read more

Adding Additional Menus In Genesis Child Themes

Here’s 2 options: First: The code goes in your child themes functions file and creates one extra menu which displays in the genesis_after_header position. There are 2 steps needed to add new nav menus. One. Register the menu(s) using the init action hook NOT after_theme_setup Two. Hook the menu into a theme hook location ( … Read more

The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”

The best way to customize a navigation menu is to use a custom ‘walker’ function.. Here are the steps how to achieve the customization that you want! Create a “wp-custom-nav-walker.php” file in your theme directory for a new custom ‘walker’ class. Extend the Walker_Nav_Menu class and copy the class’ function that you want to modify … Read more

Add class to active top level (grandparent) menu item

Styling the top-level item if it’s active or a child is active is possible with pure CSS. Use the child selector, >, from the top: .sidebar-navigation > ul > .current-menu-item, .sidebar-navigation > ul > .current-menu-ancestor {} If you want to add a new class, you can use the nav_menu_css_class filter. One of its parameters is … Read more

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