trulyandy
Forum Replies Created
-
Forum: Plugins
In reply to: [WP Photo Album Plus] [Plugin: WP Photo Album Plus] – Slideshow not working.ahhh, your response led me to the solution, which was pretty simple, of course.
my header file was missing <?php wp_head();?> before </head>
I added that and the slideshow now works.
thanks!
Forum: Plugins
In reply to: [W3 Total Cache] [W3 Total Cache] upgrade failsAlso…I have verified both wp-content and wp-content/upgrades directories are (temporarily) set to 777. I also tried to download the plugin and upload the zip but got the same error message.
any thoughts?
Forum: Plugins
In reply to: [W3 Total Cache] [W3 Total Cache] upgrade failsi am having this problem right now also.
Hey Michael — any thoughts?
Hi MichaelH –
Sorry to be confusing – I am referring to it as a ‘header’image – as it will be at the top of the main content area on each page. However, it is not in the header part of the webpage. I suppose I should have chosen a different word to refer to it as. Any suggestions?So the previous issue remains….the code does not appear to be picking up the tag correctly.
I feel like we were very close and appreciate all of the help thus far. Any continued tips or suggestions would be great!
-Andy
Hi MichaelH,
Yes, that is all correct.I created multiple Pages, and assigned them all the inner.php template.
I am hoping the header will display the correct image based on the Page ID matching the Tag I added to the ‘header image Post’
thank you so much for walking me through this!
-Andy
Hi MichaelH.
Thanks for the reply. I tried that out, and the<pre></pre>tags come up empty, with no tag or any other information inside of them.So I imagine that means it is not getting the tag properly at all.
Any ideas?
One question for you, is in the code where you put `$tag_name = $posts[0]->ID; //use page id for tag name
` are you saying I should change that line manually, or is the comment saying that I should tag the post with the Page ID that I want it to appear on? I assumed the latter, but want to verify.Other than that, what do you think? Appreciate the help!
Hmmm… Very close – any ideas what I am missing here?
Thanks, MichaelH.
I played with the code you provided a bit and got it to work to a certain degree.
The ‘headerImage’ category posts which all contain 1 image and a caption, are getting displayed in the proper place. However, the tag aspect of it appears to be ignored all together — with the template displaying the most recent post in the ‘headerImage’ category instead of the most recent post tagged with the page ID of the page you are on.
Here is the code I am working with
<?php if (is_page()) { $cat_id = get_cat_ID('headerImage'); $tag_name = $posts[0]->ID; //use page id for tag name $tag = get_term_by('name', $tag_name, 'post_tag'); $args=array( 'cat' => $cat_id, 'tag_in'=> array($tag->term_id), 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { while ($my_query->have_posts()) : $my_query->the_post(); ?> <?php the_content(''); ?> <?php endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). } ?>NOTE:
sample code above has'posts_per_page' => 5as I only want 5 posts per page, but on the actual site the code is temporarily set to'posts_per_page' => 11until the solution is found.Forum: Fixing WordPress
In reply to: Sort posts alphabetically by tag?<?php next_posts_link('« Older Entries') ?></div>I tried just adding that line in after the `<?php
endwhile;
}
wp_reset_query(); // Restore global post data stomped by the_post().
?>`It included a link that led to artists/page/2 – which I want, but it just shows the first 5 Artists again (identical to page 1). Any ideas what I would need to add so that each additional page pulls the next 5 from the list, instead of always the same first 5?
Forum: Fixing WordPress
In reply to: Sort posts alphabetically by tag?Ahh, got it. Thank you so much.
What I is for 5 posts to show on the main /artists page, so I set posts_per_page to 5, and that worked!
But, where do the other (6 for now) posts go?
Ideally, there would be a link at the bottom of every 5 posts that links to the next group of 5. Is this possible?
Forum: Fixing WordPress
In reply to: Sort posts alphabetically by tag?(michael it worked thank you!)
Forum: Fixing WordPress
In reply to: Sort posts alphabetically by tag?Michael – Thanks so much for continuing to return to this thread.
I am about to try the latest code you provided.
(More importantly) I am trying to figure out how and why it works.
The array values all make sense to me except the last 2:
'posts_per_page' => -1, 'caller_get_posts'=> 1Can you please explain what that says and does?
😉
Forum: Fixing WordPress
In reply to: Sort posts alphabetically by tag?I’m messing something up =/
http://gallerysevenmaynard.com/gamma/artists/
<?php $args=array( 'orderby' => 'meta_value', 'meta_key' => 'ArtistLastName', 'order' => 'ASC', 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => -1, 'caller_get_posts'=> 1 ); $my_query = null; $my_query = new WP_Query($args); if( $my_query->have_posts() ) { echo 'List of Posts'; while ($my_query->have_posts()) : $my_query->the_post(); ?> <p><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></p> <?php endwhile; } wp_reset_query(); // Restore global post data stomped by the_post(). ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div <?php post_class() ?> id="post-<?php the_ID(); ?>"> <div class="entry"> <h2 class="artist"><?php the_title(); ?></h2> <div class="alignright art"> <?php the_content();?></div> <div class="bio"><? echo get_post_meta($post->ID, Bio, true);?></div> <div class="clear" style="margin-bottom:60px;"></div> </div> </div>