huntz
Forum Replies Created
-
Forum: Plugins
In reply to: Twitter Tools Plugin ModHi guys,
Does anyone know if this is possible or not?
Cheers
Forum: Fixing WordPress
In reply to: Comment on CategoriesCould I try and hook posts into category id’s as well as post id’s? Anyone know how I could do this?
Thanks
Forum: Fixing WordPress
In reply to: Comment on CategoriesI can confirm including the comments template in category.php doesn’t work. It just doesn’t show.
Anyone got any ideas?
Forum: Fixing WordPress
In reply to: Comment on CategoriesCan anyone confirm if this will work?
Forum: Plugins
In reply to: Category CommentsNo one have any idea?
Thanks
Forum: Fixing WordPress
In reply to: Message on latest post.Mission Accomplished, might not be tidy but…
<?php
global $post;
$post_ID = $post->ID;$postslist = get_posts(‘numberposts=1&order=DESC&orderby=post_date’);
foreach ($postslist as $post) : setup_postdata($post);
$latestpostid = get_the_ID();
endforeach;if ($post_ID == $latestpostid) {
echo ‘MATCH’;
} else {
echo ‘NO MATCH’;
}
?>Forum: Fixing WordPress
In reply to: Message on latest post.Hi, thanks for the code but it doesn’t do what im looking for. No matter what post(single.php) I go through and see I always get the same result.
What I need to do is compare the post ID of the current post with the post ID of the last post made. If they match i do not want to show the message(or run the function).
The code i posted above is what i tried but not sure of syntax.
Thanks for the help
Forum: Fixing WordPress
In reply to: Message on latest post.Its my own function, all it does is display a message. I just need some simple code to wrap around it so the message only gets displayed on every other post but the most recent. I did have something in my head like.
$getlatestpost = get_posts(‘numberposts=1&order=DESC&orderby=post_date’);
$latestpostid = $getlatestpost ->ID;If $post->ID == $latestpostid;
echo mymessage();
else;
/* do nothing */
endif;Forum: Fixing WordPress
In reply to: Message on latest post.Hi, you can see my “mymessage()” function at the bottom of my single page. Here is the code from it
<?php get_header(); ?>
<div id=”post-entry”>
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div class=”post-meta” id=”post-<?php the_ID(); ?>”>
<div class=”top-meta”>
<div class=”post-title”>
<h1>
<?php the_title(); ?>
</h1>
<div class=”post-author”>
<?php _e(‘Posted by’); ?> <?php the_author(); ?>
on
<?php the_time(‘l, F jS Y’) ?>
<?php edit_post_link(‘edit’); ?>
<?php include (TEMPLATEPATH . ‘/submit.php’); ?>
<?php include (TEMPLATEPATH . ‘/ratings.php’); ?>
</div>
</div>
<div class=”calendar”>
<?php the_time(‘j’); ?><span class=”c-month”>
<?php the_time(‘M’); ?>
</span></div>
</div>
<div class=”post-content”>
<div class=”post-content6″></div>
<?php the_content(); ?>
<p class=”enjoyit”> Leave a “>trackback </p>
</div>
<?php include (TEMPLATEPATH . ‘/social.php’); ?>
</div>
<?php endwhile; ?>
<?php comments_template(); ?>
<?php include (TEMPLATEPATH . ‘/paginate.php’); ?>
<?php else: ?>
<?php include (TEMPLATEPATH . ‘/result.php’); ?>
<?php endif; ?><div class=”post-content”>
<div style=”font-size:12px; color:#000000″>My Message</div><?php echo mymessage(); ?>
</div>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>Forum: Fixing WordPress
In reply to: Run function if most recent post outside loop?Or something like
$getlatestpost = get_posts(‘numberposts=1&order=DESC&orderby=post_date’);
$latestpostid = $getlatestpost ->ID;If $post->ID == $latestpostid;
echo display_message();
else;
/* do nothing */
endif;Would that work? Am I making any sense lol. I just want to run a function on my single.php at the bottom of the page if its not on the latest post.
Forum: Fixing WordPress
In reply to: Run function if most recent post outside loop?Just to clarify the above is on my post page and the function is basically at the bottom of the page outside of the if (have_posts()) loop.
My understanding is i cant use $posts[0] == $post outside of the loop?
So would i use something like
<?php
$firstpost = get_posts( ‘numberposts=1&post_date&order=DESC’ );if $firstpost = 1;
echo display_message();
else;
/* do nothing */
endif
?>Forum: Fixing WordPress
In reply to: function.phpTry re-uploading the theme files you edited as well.
Forum: Fixing WordPress
In reply to: WordPress files questionsWell what I’d like to do is get my script into all the image tags that already exist in all my posts and resize them. I thought for some reason that the image tag was contained in a script somewhere and I could maybe alter it to do this. I think I’m going to have to look into some sort of crazy pre parse script unless there is any other suggestions.
Forum: Fixing WordPress
In reply to: WordPress files questionsI have an image script running. To get it to work I need to change the image tag inside the post thats displayed on the blog. When I view source on the homepage the image tag within the post would look something like <img src=”/image.php/image-name.jpg?width=100&height=100&image=/path/to/image.jpg” alt=”Don’t forget your alt text” />
Does this make things any clearer?
Forum: Fixing WordPress
In reply to: WordPress files questionsWhen I post an image in a post, i need to edit the image tag thats parsed out on the page. lets just say i wanted to add a new atribute to every img tag in the posts, where would I have to go? Am I making sense lol?