I am extending Walker_Nav_Menu: How can I get the number of children elements of the current item?
count (get_children($item)); Does that help?
count (get_children($item)); Does that help?
This is standard WP functionality and can be accomplished without a plugin. Using the admin area, create a page called Footer. in you theme’s footer.php file, add the following code inside the main footer <div>. <?php $query = new WP_Query(array(‘pagename’=>’footer’)); while ( $query->have_posts()) : $query->the_post(); the_content(); endwhile; ?> Now any text in the footer ‘page’ … Read more
When using cat in the query you need to specify the category id not name. Try this. <?php $gallery = get_cat_id(‘gallery’); $shirts = get_cat_id(‘shirts’); $hoodies = get_cat_id(‘hoodies’); $excluded_cats=”-“.$gallery.’,-‘.$shirts.’,-‘.$hoodies; $limit = 5; $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; query_posts( ‘cat=”.$excluded_cats.”&showposts=” . $limit . “&paged=’ . $paged ); ?>
Something like this might work: <?php $cat_id = get_query_var(‘cat’); $catlist = get_categories(‘hide_empty=0&child_of=” . $cat_id); echo “<ul>”; foreach($catlist as $categories_item) { echo “<h1><a href=”‘ . get_category_link( $categories_item->term_id ) . ‘” title=”‘ . sprintf( __( “View all products in %s” ), $categories_item->name ) . ‘” ‘ . ‘>’ . $categories_item->name.'</a> </h1> ‘; echo ‘<p>’. $categories_item->description; $terms = … Read more
You could try hacking into wp-includes/js/tinymce/plugins/wplink/js/wplink.js and change: if(!i.href||i.href==”http://”) (two times) b.url.val(“http://
Use the metaWeblog api instead: “metaWeblog.getRecentPosts”. This includes the permalink information. See here: http://mindsharestrategy.com/2010/wp-xmlrpc-metaweblog/
Had to go with more complex characters for explode used {@}. As rarst said an using ; for exploding not a good idea because html encoded entities have ; on them.
I solved it with the “Auto ThickBox Plus” plugin, although I am not satisfied with the layout and look of ThickBox…
Store your new WP_Query() in a variable Globalize $wp_query Move the $wp_query swap-hack to after your new WP_Query() generation Pass the variable to $wp_query, not the new WP_Query() call itself. e.g. <?php // Custom query args $press_query_args = array( ‘post_type’ => ‘press’, ‘orderby’ => ‘post_date’, //’showposts’ => ’10’, ‘posts_per_page’ => $paged, ); // Custom query … Read more
try to flush your permalink structure that might be the issue