zakphi
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to modify links hrefI don’t want to use the menu options because I don’t want there to be a chance for the client to break the links. also, if i do it using code, as long as i do it the right way, it is more dynamic.
Forum: Plugins
In reply to: [Contact Form 7] can't click in textfields if there is a validation errorLocal4530, I put it in my own CSS
Forum: Plugins
In reply to: [Contact Form 7] can't click in textfields if there is a validation errorI figured out what was wrong, there is a
display: block;
on the validation error messages. If I set the validation error messages todisplay: inline;
i can click in the text field.Forum: Plugins
In reply to: [Contact Form 7] can't click in textfields if there is a validation errorThat worked. Except the theme I am using is a custom built theme. Is there anyway I can fix my problem for my theme?
Forum: Plugins
In reply to: [Contact Form 7] Re-Directing to a new URL after submitting a formon_sent_ok: “location = ‘LINK TO NEW PAGE’;”
Forum: Fixing WordPress
In reply to: how to group posts by monthjust wanted to let you know I figured a way to do this
<?php $latest = ''; ?> <?php while ( $loop->have_posts() ) : $loop->the_post();?> <?php $date = get_the_date('F'); if($date !== $latest) { $latest = $date; ?> <h3 class="post-month"><?php echo $date;?></h3> <?php } ?>
it may not be the best way to do it, but it works.
Forum: Fixing WordPress
In reply to: how to group posts by monthdid that. but like you said it removes the date, and i want the date to be displayed. unfortunately, the month is still displayed, each day there are new posts
Forum: Fixing WordPress
In reply to: how to group posts by monthi want to group posts by month, but not have the month display every day.
here is the code for my blog page
<div class="entry-content"> <?php the_content(); ?></div> <div class="journals"> <?php $paged = ( get_query_var( 'paged' ) ) ? absint( get_query_var( 'paged' ) ) : 1; $args = array( 'posts_per_page' => 10, 'paged' => $paged ); $loop = new WP_Query( $args ); ?> <ul class="journal-post"> <?php while ( $loop->have_posts() ) : $loop->the_post();?> <span class="post-month"><?php $my_date = the_date('F', '<h3>', '</h3>', FALSE); echo $my_date; ?></span> <li> <a href="<?php echo get_permalink(); ?>"> <h2><?php the_title();?></h2> </a> <h3><?php echo get_the_date( 'm-d-y'); ?></h3> <span class="content"><?php the_excerpt(); ?></span> <span class="tags"><?php the_tags('',' '); ?></span> </li> <?php endwhile;?> </ul><!-- .journal --> <div class="pagination"> <?php $big = 999999999; // need an unlikely integer echo paginate_links( array( 'base' => str_replace( $big, '%#%', esc_url( get_pagenum_link( $big ) ) ), 'format' => '?paged=%#%', 'current' => max( 1, get_query_var('paged') ), 'end_size' => 0, 'mid_size' => 1, 'prev_text' => 'Previous', 'next_text' => 'Next', 'type' => 'list', 'total' => $loop->max_num_pages ) ); ?> </div><!-- .pagination --> </div><!-- .journals --> <?php endwhile; // end of the loop. ?>
and here is a screenshot of it
https://drive.google.com/file/d/0B99cydODex2QT3hxb0VXVGticDA/edit?usp=sharingas you can tell, i have posts from different days this week, and the month is displayed each day. i just want the month to be displayed once.