dlogan
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to get just the top most parent category?From what the article says, it won’t work. It just returns a true or false.
Forum: Fixing WordPress
In reply to: Display the content from the parent page on the subpageNo its this code that needs to get the parent page:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?if (get_post_meta(get_the_ID(), "Show", true)):?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#CC3300" class="header" style="padding: 10px;"><span class="big"><?the_title()?></span><br /><?the_content()?></td> </tr> </table> <?endif;?> <?php endwhile; endif; ?>
Forum: Fixing WordPress
In reply to: Display the content from the parent page on the subpageThanks Michael, but that didn’t work.
It may have something to do with the fact that I built this template to serve as an Email template (hence the tables) and it doesn’t have the normal wp header?
Here is the full code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="https://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <style> body { font-family:Georgia,Times,serif; font-size:12px; font-size-adjust:none; font-style:normal; font-variant:normal; font-weight:normal; line-height:normal; } .big { font-size: 24px; } .header { color: #FFFFFF; } .header a{ color: #FFFFFF; } .body { color: #666666; line-height: 22px; } a { color: #333333; text-decoration: underline; } </style> </head> <body bgcolor="#CDCDCD" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0"> <table border="0" cellpadding="0" cellspacing="0" align="center" width="636"> <tr> <td><img src="<?php bloginfo('template_url');?>/images/email_header.jpg" alt="AIGA Central PA" border="0" usemap="#Map"/></td> </tr> <tr> <td> <table border="0" cellpadding="6" align="center" width="600" bgcolor="#FFFFFF"> <tr> <td colspan="2"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <?if (get_post_meta(get_the_ID(), "Show", true)):?> <table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr> <td bgcolor="#CC3300" class="header" style="padding: 10px;"><span class="big"><?the_title()?></span><br /><?the_content()?></td> </tr> </table> <?endif;?> <?php endwhile; endif; ?> <?php $my_query = new WP_Query('category_name=Upcoming Events&orderby=date&order=ASC&posts_per_page=1&offset=1'); while ($my_query->have_posts()) : $my_query->the_post(); ?> <img src="<?php echo get_meta_image_url(get_post_meta(get_the_ID(), "Email Image", true))?>" width="600"/><br /> <table width="100%" border="0" cellpadding="0" cellspacing="0" > <tr> <td valign="top"> <br /> <table width="100%" border="0" cellpadding="10" cellspacing="0" > <tr> <td class="body"> <p><span class="big"><?the_title()?></span></p> <p><?php the_time('F jS, Y') ?> | <a href="<?php the_permalink()?>">Click Here to Register/RSVP</a></p> <p><?php the_tags('<strong>Sponsored by:</strong> ', ', '); ?></p> <p><?the_content()?></p> </td> </tr> </table> <?if (get_post_meta(get_the_ID(), "Show Registration", true)):?> </td> <td valign="top"> <br /> <table width="250" border="0" cellpadding="10" cellspacing="0"> <tr> <td bgcolor="#EA8624" class="header">Register for this Event </td> </tr> <tr> <td bgcolor="#FBE9D7" class="body"> <?php $info = get_post_meta($post->ID, 'Registration Info', true); ?><?php echo $info; ?> <?if (get_post_meta(get_the_ID(), "Nonmember", true)):?> <p> <?php $nonmember = get_post_meta($post->ID, 'Nonmember', true); ?> <strong>Non-members:</strong> $<?php echo $nonmember; ?> <a href="<?php the_permalink()?>">Register</a> </p> <?endif;?> <?if (get_post_meta(get_the_ID(), "Student Nonmember", true)):?> <p> <?php $studentnonmember = get_post_meta($post->ID, 'Student Nonmember', true); ?> <strong>Student Non-members:</strong> $<?php echo $studentnonmember; ?> <a href="<?php the_permalink()?>">Register</a> </p> <?endif;?> <?if (get_post_meta(get_the_ID(), "Member", true)):?> <p> <?php $member = get_post_meta($post->ID, 'Member', true); ?> <strong>Members:</strong> $<?php echo $member; ?> <a href="<?php the_permalink()?>">Register</a> </p> <?endif;?> <?if (get_post_meta(get_the_ID(), "Student", true)):?> <p> <?php $student = get_post_meta($post->ID, 'Student', true); ?> <strong>Students:</strong> $<?php echo $student; ?> <a href="<?php the_permalink()?>">Register</a> </p> <?endif;?> </td> </tr> </table> <?endif;?> <?if (get_post_meta(get_the_ID(), "Sponsor Logo", true)):?> <table width="250" border="0" cellpadding="10" cellspacing="0"> <tr> <td> <p><img src="<?php echo get_meta_image_url(get_post_meta(get_the_ID(), "Sponsor Logo", true))?>" width="225" alt="#" /></p> </td> </tr> </table> <?endif;?> </td> </tr> </table> </td> </tr> <?php endwhile; ?> <tr> <td colspan="2"><table width="100%" border="0" cellpadding="10" cellspacing="0"> <tr> <td bgcolor="#DADADA" class="body">© 2010 AIGA Central PA Chapter | The professional association for design.</td> </tr> </table></td> </tr> </table></td> </tr> </table> <map name="Map" id="Map"><area shape="rect" coords="155,107,251,133" href="https://centralpa.aiga.org" /> <area shape="rect" coords="258,107,403,133" href="https://centralpa.aiga.org/category/upcoming-events" /> <area shape="rect" coords="411,107,585,131" href="[fwd_url]" /> </map></body> </html>
Forum: Plugins
In reply to: Display the second post in a category?Thanks that worked great.
Forum: Fixing WordPress
In reply to: Random posts from one category?Awesome. So simple, yet so awesome ?? Thanks.
Forum: Themes and Templates
In reply to: Custom category page not paginating properlyTried that, but its still not working.
Any other ideas?
Forum: Themes and Templates
In reply to: Custom category page not paginating properlyHi Esmi,
Thanks for the help, but that didn’t work. Here is what I am referring to:
https://aiga.inovat.us/category/previous-events
If you go to the “Older Events” at the bottom it goes to page 2, but you can never get to page 3 or 4…
Here is the code of that page:
<?php get_header();?> <div id="content-home"> <?$paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $my = new WP_Query('category_name=Previous Events&showposts=5&orderby=date&order=DESC&paged=' . $paged)?> <?php if ($my->have_posts()) : ?> <div class="events previous"> <h2><?php if(function_exists('bcn_display')) {bcn_display();}?></h2> <div class="holder"> <?php while ($my->have_posts()) : $my->the_post(); ?> <?$more=0?> <div class="event"> <?if (get_post_meta(get_the_ID(), "Little Image", true)):?> <div class="holder-img"> <a href="<?php the_permalink()?>"> <img src="<?php echo get_meta_image_url(get_post_meta(get_the_ID(), "Little Image", true))?>" width="100" height="100" alt="#" /> <?if (get_post_meta(get_the_ID(), "Date Small", true)):?> <span class="date"><?php echo get_post_meta(get_the_ID(), "Date Small", true)?></span> <?endif;?> <span class="b-shadow"><span> </span></span> </a> </div> <?endif;?> <div class="text-hold"> <h3><a href="<?the_permalink()?>"><?the_title()?></a></h3> <span class="event-date"><?php echo get_post_meta(get_the_ID(), "Date Large", true)?> |</span> <?the_excerpt()?> <span class="links"><a href="<?php the_permalink()?>">Read more</a> | <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?><?php the_tags(' | Sponsored by: ', ', '); ?> </span> </div> </div> <?endwhile;?> </div> </div> <?endif;?> <div class="navigation"><p><?php previous_posts_link('< Newer Events', '0') ?> <?php next_posts_link('Older Events >', 0); ?></p></div> </div> <?get_sidebar()?> </div> <?php get_footer(); ?>
Thanks for any help.
Forum: Themes and Templates
In reply to: Custom category page not paginating properlyThanks Esmi,
That fixed the second page with one exception, it only has the “previous page” option on it. However there are 4 or 5 pages in total. I manually entered the url for the subsequent pages and they have the correct posts on them, just no “next page” only “previous page”.
Any ideas on that? Thanks again.