nemci7v
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: query post metaOoh! I didn’t know codex covered that. As reference for anyone trying to use a variable with your meta this works,
query_posts('meta_value=' . $some_variable);
Forum: Themes and Templates
In reply to: Styling just category widgetEsmi that theory totally works! Thanks!
Forum: Fixing WordPress
In reply to: current_page link for indexSorry, the site isn’t published yet. I’ll post a link soon.
Forum: Fixing WordPress
In reply to: post_class for alternating colorsThanks!
Forum: Fixing WordPress
In reply to: Finding site's database nameForum: Fixing WordPress
In reply to: post thumbnails align to topI found a workaround by editing media.php from wp-includes but does anyone know an easier way to achieve this? I wish the new wp version would have options for crop positions.
Forum: Fixing WordPress
In reply to: Getting post thumbnail URLTrepmal you’re awesome! post-thumbnail works ?? I’ll add the code to my functions, it’s very useful ??
Forum: Fixing WordPress
In reply to: Getting post thumbnail URLStill generates the full size URL
https://www.website.com/wp-content/uploads/2010/09/AX0480GR2.jpg
this is weird. Using the_post_thumbnail(), the URL path is the thumbnail’s but I’m not sure how that’s generated.
Forum: Fixing WordPress
In reply to: Getting post thumbnail URLThanks trepmal!
I did try that code, it works but it gets the full size image url. For example,
https://www.website.com/wp-content/uploads/2010/09/AX0480GR2.jpg
the url for the thumbnail would be
https://www.website.com/wp-content/uploads/2010/09/AX0480GR2-300x298.jpg
I can’t find any documentation on how to get the exact URL for the generated thumbnail.. ??
Forum: Themes and Templates
In reply to: Change body background on page templateaah thanks that’s neat!
Forum: Fixing WordPress
In reply to: include header in non-theme fileok I tried removing
<?php bloginfo('template_url'); ?>
from<form action="<?php bloginfo('template_url'); ?>/sendmail.php" method="post">
and now I just get page not found. but in browser its shows /sendmail.php after the website address.Forum: Fixing WordPress
In reply to: Why are they all first-child?ok I figured it out ?? I had to put the enwdhile and eddif in the li tags
Forum: Fixing WordPress
In reply to: include header in non-theme fileThank you for the suggestion. I had tried that too but I get the same message
Call to undefined function get_header()
the form itself is in a custom page template named Contact but the page with the code that emails the form is separate.
the code I’m using on it is
<?php //create short variable names $name = trim($_POST['name']); $email = trim($_POST['email']); $email2 = trim($_POST['email2']); $phone = trim($_POST['phone']); $comment = trim($_POST['comment']); if($name !=='' && $email2 !=='' && $comment !=='' && filter_var($email, FILTER_VALIDATE_EMAIL)!==false) { //set up some static information $toaddress = "[email protected]"; $subject = "New Message"; $mailcontent = "Customer name: ".$name."\n". "Customer email: ".$email."\n". "Customer phone: ".$phone."\n". "Customer comments:\n".$comment."\n"; $fromaddress = 'From: '. $_POST['name'].' <'.$_POST['email'].'>'. "\r\n"; //invoke mail() function to send mail mail($toaddress, $subject, $mailcontent, $fromaddress); }else{ die("Please fill all fields and enter a valid email address."); } ?> <h1>Thank you <?php echo $name; ?>!</h1> <p>Your message has been sent. We'll get back to you shortly!</p>
and for some reason I can’t include the header or any other function I think.
Forum: Fixing WordPress
In reply to: Why are they all first-child?Ooh I’m so sorry!! I forgot to mention that the code is in a loop
the whole code is..
<div id="post" class="clearfix"> <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <ul class="blog_post"> <li> <h3><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h3> <?php echo substr(get_the_excerpt(), 0,250); ?> <br /> <div class="more"><a href="<?php the_permalink() ?>" rel="bookmark"> More info ?</a></div> </li> </ul> <?php endwhile; else: ?> Not Found, Error 404 <?php endif; ?>
Now that generates more li and interprets each one as first-child
Forum: Fixing WordPress
In reply to: Why are they all first-child?hmm makes sense but the php generates more li in html no? First-child works whenever I list navigation links. I don’t understand ??