conditional statement expressing that current user didn’t logout (is still in the same login session)?
if ( is_user_logged_in() ) { echo ‘Hello ‘ . wp_get_current_user()->display_name; }
if ( is_user_logged_in() ) { echo ‘Hello ‘ . wp_get_current_user()->display_name; }
You’re testing if it’s NOT the home page (your news page) before outputting your block of javascript, so your quicksand code never gets output to page: if (!is_home() || !is_front_page()) { I don’t see any code anywhere that creates the nivo slider. This block needs to reference jQuery, not $: $(document).ready(function(){ $(“.anyClass”).jCarouselLite({ auto: 800, speed: … Read more
It doesn’t really get any better than the Jetpack Infinite Scroll Documentation. This is about as easy and user friendly as any of us could make it, and far more in depth. I did this to one of my blogs recently, and it basically uses AJAX (Asynchronous Java script) to call a bit of PHP … Read more
easy just pass it the $id off which to get the children global $id; wp_list_pages(“title_li=&child_of=$id”); of if you want in the loop then wp_list_pages(“title_li=&child_of=$post->ID”);
As mmm said, wp stores all dates× in gmt, but will show times as per the setting timezone. So you can cgange the timezone without the history needing to be updated. I prefer to use the php datetime when working with time. Gives better control and flexibility, eg if you want to show events in … Read more
how to display active, upcoming and past event with featured listing with pagination
You need to do these, in order to make the “Show comments” part works properly: On the “Edit Comment” page (at wp-admin/comment.php), the first parameter passed to the meta box callback (your my_post_comment_meta_box() function) is a WP_Comment object and not a WP_Post object, so you need to manually define $post in your function. Add back … Read more
You can’t do this in the meta query I’m afraid. You’d need to get all the relevant records in meta query, then make that comparison inside PHP, to filter out the records you don’t need.
In the Appearance > Menus panel, you can expose custom class fields by clicking the “Screen Options” tab at the top of the page. From there, each menu item will have a custom css field labeled “CSS Classes (optional)” where an admin can put any plain text class name.
This is really just a matter of logic. You need to conditionally print the div markup. The counter in $wp_query will let you chose every second post. if (have_posts()) { echo ‘<div class=”posts-wrapped”>’; while (have_posts()) { the_post(); if (0 !== $wp_query->current_post && 0 === $wp_query->current_post%2 ) { echo $wp_query->current_post.'</div><div class=”posts-wrapped”>’; } the_title(); echo ‘<br />’; … Read more