sincewelastspoke
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Order my PostsNever mind.
I added a conditional statement to change the $args based on the page id.
OK.
I’ve now resolved this using the
do_shortcode()
function inside my script.Deep joy ??
Forum: Fixing WordPress
In reply to: Crop the_content() after 2ndThank you. I will investigate this a bit more shortly.
Forum: Fixing WordPress
In reply to: Crop the_content() after 2ndHi,
I have the code:
<p>test1</p><p>test2</p><p>test3</p><p>test4</p>
in my WordPress page.I’d like to output this in the Loop to just show:
<p>test1</p><p>test2</p>
Forum: Fixing WordPress
In reply to: Crop the_content() after 2ndCurrently the text is:
<p>test1</p><p>test2</p><p>test3</p><p>test4</p>
I’d like to crop the outputted text to simply:
<p>test1</p><p>test2</p>
Hope this helps. Thank you.
Forum: Fixing WordPress
In reply to: Add CSS code to list item for every 3rd loop in WPBrilliant.
Thank you.
I also got this PHP solution:
if( have_posts() ) : $i=0; while ($wp_query->have_posts()) : $wp_query->the_post(); $i++; ?> <li <?php if(($i % 3)==0)echo 'style="background:red"';?>>Test</li> <?php endwhile; ?> <?php endif;
Forum: Plugins
In reply to: Plugins to auto-update Twitter,Facebook and Google when I add blog entryAnyone?
Forum: Fixing WordPress
In reply to: Reorder my Blog Posts?You’re right, it would ??
$args = array( 'category__in' => '3', 'caller_get_posts' => 1 ); if ( $paged > 1 ) { $args['paged'] = $paged; } $my_query = new WP_Query($args);
I’m guessing I would just the Orderby info to my current $args array?
How silly of me to miss this.
Forum: Fixing WordPress
In reply to: Change order of PostsForum: Fixing WordPress
In reply to: ORDER Posts by Title?Thanks for the quick reply.
Unfortunately this also doesn’t work.
It just leaves a blank space where I hoped the looped list items would appear.
Current code:
<?php while ( $my_query->have_posts() ) : $my_query->the_post(); ?> <?php //necessary to show the tags global $wp_query; $wp_query->in_the_loop = true; $my_query = new WP_Query($wp_query . '&orderby=title'); $slug = basename(get_permalink()); ?> <li><a href="<?php the_permalink(); ?>" class="<?php echo $slug; ?>"><span><?php the_title(); ?></span></a></li> <?php endwhile; ?>
Forum: Fixing WordPress
In reply to: Display Custom Field Data on Web PageHi vtxyzzy, thanks for the reply.
Yes, that should be fine. Have done this before.
I was just trying to think if there was an easier way of doing it ??Like just doing a
<!--{blog posts}-->
Thanks again
Forum: Fixing WordPress
In reply to: Sort Posts by Custom Field Value?OK. Found it:
<?php query_posts($query_string . '&meta_key=orders&orderby=meta_value'); if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
Forum: Fixing WordPress
In reply to: Using esc_urlGood call. It’s a frustrating experience when the OP just adds ‘It’s ok, I got it working’….and then nothing ??
Thanks for your assistance. Will let you know how it goes.
Forum: Fixing WordPress
In reply to: Using esc_urlAwesome Mark!!! I will take a look into this. Many thanks.
Forum: Fixing WordPress
In reply to: Using esc_urlThanks for this.
I’m actually hoping to use the URL field for different data.
It would store the ‘Location’ of the user.
Does it make sense to do this, or is it easier to add another field to the Comments box? Is this even possible?Thanks again