andrew-s3
Forum Replies Created
-
I too am having this issue as well – has there been any resolution?
Forum: Fixing WordPress
In reply to: [LOOP] Trouble w/ orderby metakey valuesVICTORY IS MINE!
<!-- LOOP START --> <?php //WP_Query Arguments $args = array ( //'cat' => '2', 'posts_per_page' => '5', 'meta_key' => 'prana_event_date', 'meta_value' => date('Ymd'), 'meta_compare' => '>=', 'orderby' => 'meta_value_num', 'order' => 'ASC', ); ?> <?php $the_query = new WP_Query( $args ); ?> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <section> <?php $date= get_field('prana_event_date'); ?> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail( array(175,110) );?><div class="overlay"></div></a> <div class="event-info"> <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3> <p class="date"><?php echo date('l, F jS, Y', strtotime($date)); ?></p> <?php the_excerpt(); ?> <a href="<?php the_permalink() ?>" class="more-info">more info ></a> </div> </section> <?php endwhile;?> <!-- LOOP FINISH -->
Forum: Fixing WordPress
In reply to: [LOOP] Trouble w/ orderby metakey valuesI’ve modified my LOOP to the following:
<!-- LOOP START --> <?php //WP_Query Arguments $args = array ( 'cat' => '2', 'posts_per_page' => '5', 'meta_key' => 'prana_event_date', 'orderby' => 'meta_value_num', 'order' => 'ASC', ); $date= get_field('prana_event_date'); ?> <?php $the_query = new WP_Query( $args ); ?> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <section> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail( array(175,110) );?><div class="overlay"></div></a> <div class="event-info"> <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3> <p class="date"><?php echo date(strtotime('M d Y', $date)); ?></p> <?php the_excerpt(); ?><p><?php the_field( 'prana_event_date' ); ?></p> <a href="<?php the_permalink() ?>" class="more-info">more info ></a> </div> </section> <?php endwhile;?> <!-- LOOP FINISH -->
I’m still not getting a proper print of the date at all; it’s also not ordering by the meta_key prana_event_date either.
Forum: Fixing WordPress
In reply to: [LOOP] Trouble w/ orderby metakey valuesOkay – I’ve implemented what you’ve suggested into my loop below – the problem seems to be that it’s not “printing” at all – nor are the posts being sorted ASC/DESC by my meta_key value.
<!-- LOOP START --> <?php //WP_Query Arguments $args = array ( 'cat' => '2', 'posts_per_page' => '5', 'meta_key' => 'prana_event_date', 'orderby' => 'meta_value_num', 'order' => 'ASC', ); $date= get_field('prana_event_date'); ?> <?php $the_query = new WP_Query( $args ); ?> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <section> <a href="<?php the_permalink() ?>"><?php the_post_thumbnail( array(175,110) );?><div class="overlay"></div></a> <div class="event-info"> <h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3> <p class="date"> <?php // convert to Unix timestamp, then reformat, then print result echo date(strtotime('M d Y', $date)); // above prints ex. Sept 25 2013 ?> </p> <?php the_excerpt(); ?><p><?php the_field( 'prana_event_date' ); ?></p> <a href="<?php the_permalink() ?>" class="more-info">more info ></a> </div> </section> <?php endwhile;?> <!-- LOOP FINISH -->
Forum: Fixing WordPress
In reply to: [LOOP] Trouble w/ orderby metakey valuesI’m sorry I completely spaced – I’m going to see if I can work with this and get it sorting properly by the 20130925 # – let’s see
Forum: Fixing WordPress
In reply to: [LOOP] Trouble w/ orderby metakey valuesnow is there a way for me to convert that same data to “Wednesday, September 25, 2013”?
Forum: Fixing WordPress
In reply to: [LOOP] Trouble w/ orderby metakey valuesI’m using the ‘Advanced Custom Fields’ Plugin to create my custom fields – here’s the settings for that field.
Save Format – DD, MM dd
Display Format – mm/dd/yynow the SAVE FORMAT is the one that gets entered into the database – if i need to switch this to a number string like ‘20130925’ how would I then convert that # into a String like – ‘Wednesday, September 25, 2013’ in my SECTION code?
Forum: Themes and Templates
In reply to: [LOOP ISSUES] Custom loop displaying invisible contentFIXED thanks to some help on codingforums
Forum: Themes and Templates
In reply to: [LOOP ISSUES] Custom loop displaying invisible contentOkay so I adjusted the positioning issue by using display:table elements – but it’s still not displaying properly – and HOME is still visible above my loop.
So frustrating – I just want my 1 post to look like this – IMAGE
Forum: Themes and Templates
In reply to: [LOOP ISSUES] Custom loop displaying invisible contentI’ve changed the loop around a little bit:
<div class="spotlight"> <!-- LOOP START --> <?php $the_query = new WP_Query( 'cat=14&order=DESC&posts_per_page=1' ); $url = get_permalink(); $title = the_title(); ?> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <div class="spotlight-image"><a href="<?php the_permalink() ?>"><?php the_post_thumbnail( array(686,686) );?></a></div><div class="clear"></div><div class="spotlight-content"><h3 class="headline"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3><?php the_excerpt(); ?><div class="clear"></div></div> <?php endwhile;?> <!-- LOOP FINISH --> </div><!--/.spotlight-->
but “HOME” is still displaying in the source code – just not visually on the page anymore in its current state.
I’m also having problems with positioning – as is apparent.
HELP!
Forum: Fixing WordPress
In reply to: How to Set Feed to Newest First & Specific CategoryThanks for the link – I’ll take a look!
Forum: Fixing WordPress
In reply to: How to Set Feed to Newest First & Specific CategoryThanks for the update ESMI – I’ll make that change now.
Is there any way that I can incorporate the “Mullet Loop” i.e. display the most recent post in full; then the next 4 recent posts as excerpts?
I’ve been trying to find sample code, but nothing I’ve found thus far works properly.
Forum: Fixing WordPress
In reply to: How to Set Feed to Newest First & Specific CategoryI figured it out – changed my query to the following:
<?php $the_query = new WP_Query( 'cat=4&order=ASC&showposts=5' ); ?>
Forum: Fixing WordPress
In reply to: How to Set Feed to Newest First & Specific CategorySorry for the duplicate code – it posted wrong the first time
<ul class="recent-posts"> <!-- LOOP START --> <?php $the_query = new WP_Query( 'showposts=5' ); ?> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <!-- THIS DISPLAYS THE POST THUMBNAIL, The array allows the image to has a custom size but is always kept proportional --> <li><?php the_post_thumbnail( array(100,100) );?></li> <!-- THIS DISPLAYS THE POST TITLE AS A LINK TO THE MAIN POST --> <li><h3><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h3></li> <!-- THIS DISPLAYS THE DATE/AUTHOR META DATA --> <li><span class="featured-data">Posted by <?php the_author_posts_link(); ?> in <?php the_category(', '); ?> | <?php the_time('F d, Y'); ?></span></li> <!-- THIS DISPLAYS THE EXCERPT OF THE POST --> <li><?php the_excerpt(); ?></li> <!-- READ MORE LINK --> <li><a href="<?php the_permalink() ?>" class="read-more">Read More...</a></li> <hr /> <?php endwhile;?> <!-- LOOP FINISH --> </ul>
Forum: Networking WordPress
In reply to: Problems Detecting Second SiteIT’S ALIVE!
had to make sure that the settings via dns for my subdomain pointed to the root directory; it was pointing to it’s own directory, and that was the problem.