Articles of codex

How to use WP_Term with (menu) argument in the wp_nav_menu?

I am trying to understand the wp_nav_menufunction and i am okay with its arguments but wordpress states to use int , string and WP_Term with the menu key. I need to know how to use the WP_Term with it because wordpress just offers the core class WP_Term.You can just explain the concept if you want. […]

I want to remove the home page header image from all other pages

I want to remove the home page header image from all other pages. When you click an individual article, the feature image and header image blend into each other in an unflattering way.There needs to be separation between the images or have the header image remain on the home page only. www.mybesthelperblog.wordpress.com

Where is the changelog for 3.5? where is the list of added removed files?

This: http://codex.wordpress.org/Changelog/3.5 is not a changelog. This: http://codex.wordpress.org/Version_3.5 gives a few changes, etc, but no list of files added and removed. Where might I find a list of ‘breaking changes’? Actions and Filters that work differently?

When to use an if statement after get_posts?

Whilst looking through the codex for the get_posts function, I noticed that in the majority of the examples they do not show an if statement after call to get_posts Example: <?php $args = array( ‘posts_per_page’ => 10, ‘order’=> ‘ASC’, ‘orderby’ => ‘title’ ); $postslist = get_posts( $args ); foreach ( $postslist as $post ) : […]

Calling a plugin in theme development

I am trying to call plugins on a theme page. Specifically I am after the ‘User Avatar’ theme but their will be other later. How do I call a plugin on a theme? Presumable something linke <?php …plugin name… ;?> but that isn’t it. Any ideas. Marvellous

Does codex.wordpress.org use a plugin of some sort? If so what plugin?

I’m attempting to set up a wiki within a WordPress install and love the way codex.wordpress.org is set up. Are they using a specific plugin to accomplish that or just well structured pages? Is there a similar plugin available to users?

Browser title script ignoring is_page /else conditional

I’ve used this code to stipulate different separators for different pages in my clients site: <title> <?php if(is_page(‘Portfolio’)){ wp_title( ‘of’, true, ‘right’ ); echo wp_specialchars( get_bloginfo(‘name’), 1 ); }else{ wp_title( ‘by’, true, ‘right’ ); echo wp_specialchars( get_bloginfo(‘name’), 1 ); } ?> </title> What it’s outputting regardless of where I am on the site is : […]

Override Constants in Child theme

I have a parent theme that declare these constant in function.php: define(“THEME_DIR”, get_template_directory()); define(“THEME_DIR_URI”, get_template_directory_uri()); define(“THEME_NAME”, “BARNELLI”); define(“THEME_STYLES”, THEME_DIR_URI . “/css”); define(“THEME_INCLUDES”, THEME_DIR . “/includes”); define(“THEME_POST_TYPES”, THEME_DIR . “/includes/post-types”); define(“THEME_INCLUDES_URI”, THEME_DIR_URI . “/includes”); define(“THEME_FONTS”, THEME_DIR_URI . “/font-awesome”); i need to modify some files included in includes directory and copy the directory structure (including files). As […]

Why does WP recommend against custom favicon functionality in themes?

I am developing a WordPress theme, and when reading the Codex article on Theme review, WP recommendeds against allowing custom favicons in a theme. Does anyone know the reason for this recommendation? From the Codex: Favicons Themes are recommended not to implement custom favicon functionality. If implemented, favicon functionality is required to be opt-in, and […]

How can i list current author's categories?

My Code getting authors written post categories but just 2 ID has author lists category.. I replace $current_user->ID but it is not worked. <?php $categories = $wpdb->get_results(” SELECT DISTINCT(terms.term_id) as ID, terms.name, terms.slug FROM $wpdb->posts as posts LEFT JOIN $wpdb->term_relationships as relationships ON posts.ID = relationships.object_ID LEFT JOIN $wpdb->term_taxonomy as tax ON relationships.term_taxonomy_id = tax.term_taxonomy_id […]