Help in query for list links

Try it like this: $dates = array(); // declare an array to hold dates echo ‘<ul>’; if (have_posts()) : while (have_posts()) : the_post(); $thisday = get_the_time(‘m/d/Y’); // this post’s date if (!in_array($thisday,$dates)) { // check if it’s in the array echo ‘<h5>Date ‘.$thisday.'</h5>’; // if not, print header with date $dates[] = $thisday; // and … Read more

Cannot get tags working from a WPAlchemy metabox with wp_editor()

sorry you were having trouble with my “Holy Grail”. It looks like you missed an important part in my functions.php sample: apply_filters(‘meta_content’,$simple_textarea->get_the_value(‘test_editor’)); You weren’t using WP Alchemy’s get_the_value method. So instead of: $richtextcontent = $page_type_richtext->the_value( ‘richfield’ ); yours should have been: $richtextcontent = $page_type_richtext->get_the_value( ‘richfield’ ); You were using the_value which echos out the value … Read more

Remove Permanent URL for custom post types

To get this to work, you’ll probably need to set multiple arguments to get exactly the way you want. In situations like this, I usually start by settings the public argument to false and then adding in everything that I do want displayed. In this case, setting public to false also sets publicly_queryable to false … Read more

How to set-up multiple cron task with wp_schedule_event so that they do not overlap?

Ok that was pretty easy // Set the CRON for pages wp_schedule_event( current_time( ‘timestamp’ ) + 450, self::FB_CRON_FREQUENCY, self::FB_CRON_PAGES, array( Ai1ec_Facebook_Graph_Object_Collection::FB_PAGE ) ); // Set the CRON for groups wp_schedule_event( current_time( ‘timestamp’ ) + 900, self::FB_CRON_FREQUENCY, self::FB_CRON_GROUPS, array( Ai1ec_Facebook_Graph_Object_Collection::FB_GROUP ) ); // Set the CRON for users wp_schedule_event( current_time( ‘timestamp’ ) + 1350, self::FB_CRON_FREQUENCY, self::FB_CRON_USERS, … Read more

Single Image Gallery Post [closed]

Read Theme Unit Test and import the test data (including images!) into a new blog. You will get everything you need to test. There is a gallery post included (Images Test), and if you click on an image you get an attachment page for this gallery image. Here is a screen shot from TwentyEleven: See … Read more

How can I add more code to this?

To insert new code you need to break php code and past your new html+/-php code. But pay attention that after passing all will have correct syntax. Your question should be made like this: <?php $my_query = new WP_Query( “cat=11&posts_per_page=1” ); if ( $my_query->have_posts() ) { while ( $my_query->have_posts() ) { $my_query->the_post(); ?> <h2><a href=”https://wordpress.stackexchange.com/questions/53008/<?php … Read more

Adding a unique class to wp_nav_menu

Check out the section titled Adding Conditional Classes to Menu Items on the wp_nav_menu Codex page. This should give you a pretty good overview for adding classes to menu items using the nav_menu_css_class filter. For what you asked to do, which is add menu_element to the class attribute for both the menu item with ID … Read more