wpismypuppet
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Problem with last page when split post up into different pages?What browser are you using? On my machine it comes in looking like the other pages. I’ve checked in Firefox, Chrome, Opera, Safari and IE9… Let me know.
Forum: Fixing WordPress
In reply to: Pictures don't align properly in tableWell, actually you have two “#body table td” styles… one on line 81 and one on line 383. You should combine those as they are the same…
Forum: Fixing WordPress
In reply to: Pictures don't align properly in tableEdit your style.css file, look for #body table td and add vertical-align: top; to it. Should look like this (taken from your current style.css file):
#body table td { color: #6E6E6E; vertical-align: top; }Forum: Fixing WordPress
In reply to: Get media settings image size dimensionsYeah, pretty interesting stuff. I’d be willing to share the information with anyone who’s interested. But before I do, I’d like to know that I’m doing it a clean and effective way. Anyone?
Forum: Fixing WordPress
In reply to: Get media settings image size dimensionsWell, it’s sort of a plugin. I have a custom function to create custom meta boxes dynamically. All you have to do is create an array… my function loops through the array and creates a table of meta box form fields.
One of the options you can use is “photo” which basically creates a button on the page to allow you to open the built in Media Uploader in a thichbox. You can select an image from there, and it will place the id of that image in a hidden field, but show the image itself in the meta box as a preview.
Since the javascript code only gets the path to the original image (which is what I want), I need the javascript to also be able to add a width and height attribute to the “preview” image when it inserts it… to keep it nicely formatted. When the page loads, PHP handles that piece, so no need to worry about that.
Again, my solution above is working, and I’m getting the values. I’m just not sure it’s the best approach and am looking for suggestions.
Forum: Fixing WordPress
In reply to: Self-hosted blog admin login redirects to wordpress.org.htaccess files are hidden by default. Most FTP applications will show hidden files, but some are set to not show them by default. Look in your FTP application setting for a hide/show hidden files option. Make sure that’s checked to show hidden files.
If it is, and there are still no .htaccess files (usually in the root WordPress folder and sometimes in the wp-admin folder), then the only other thing I can think of is that your WordPress database table containing options is set to point to the wrong URL.
FileZilla is a good FTP program that shows hidden files by default and is really easy to use… http://filezilla-project.org/
Hope this helps.
Forum: Fixing WordPress
In reply to: Adding conditional statementYou are welcome… see, when you work too long at a particular issue things start to get blurry. The code I sent you was one that I used for a much more complex issue… but it was so late I forgot about the simple get_posts() function. Glad it worked out! From now on we’ll all get more sleep 🙂
Forum: Fixing WordPress
In reply to: Adding conditional statementLooks like, according to your posted code, you’d add something like this in the { Your Code Here }:
<div class="exerptpost"> <?php the_post_thumbnail(array(230,230), array('class' => 'archimg')); ?> <h1><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h1> <div class="entrydate"><?php the_time('l, F jS, Y') ?></div> <p><?php echo excerpt(145); ?></p></div>Good luck and let me know… check out that get_posts() link I sent you… might be easier than what I’m suggesting. It’s late and now I’m over complicating things 🙂
Forum: Fixing WordPress
In reply to: Adding conditional statementOr since you aren’t showing any “page” content on the homepage (looks like just a slideshow) you could probably replace the one loop with my code… or just this:
http://codex.wordpress.org/Template_Tags/get_posts
to get just the top two posts… many options!
Forum: Fixing WordPress
In reply to: Adding conditional statementGotcha… so here’s the deal… you’ll need a second loop, outside the main loop, where you want these top posts to go… So where ever you want it to show, add:
<?php $args=array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 2 ); $my_query = null; $my_query = new WP_Query($args); if($my_query->have_posts()) : while($my_query->have_posts()) : $my_query->the_post(); { Your code here } endwhile; endif; ?>Your first loop will pull the content from the page itself… this second loop with get the latest 2 posts. Not tested, but should be closer to what you are looking for…
Forum: Fixing WordPress
In reply to: Adding conditional statementCan you post the code for slideshow.php?
Forum: Fixing WordPress
In reply to: Warning: copy() [function.copy]: SAFE MODE Restriction in effect.Yes… this is a PHP restriction. Your PHP install is running in safe mode and your account is trying to run a function is does not have access to run. You need to access the php.ini file to turn this off. If you don’t have access, your host will. Also, safe mode is depreciated as of PHP5.3.0… you should probably get them to upgrade your PHP version while you are at it.
Forum: Fixing WordPress
In reply to: Adding conditional statementTrust me… I get it. That’s all we do where I work… try to make things easier for the end user. In fact, the easier it is for them to use the system, the more coding it is on our end!
Good luck and let me know if there’s anything else I can help with.
Forum: Fixing WordPress
In reply to: Adding conditional statementThis is typically my index.php files…
<?php if(have_posts()) : get_header(); while(have_posts()) : the_post(); the_content(); endwhile; get_footer(); else : header('Location: 404.php'); endif; ?>And my blog pages look a lot like yours…
Forum: Fixing WordPress
In reply to: Adding conditional statementwell, what I typically do (because almost all of the blogs we create are so unique) is to create a physical page (in your case “archive.php” and at the very top add <?php // Template Name: Blog ?>. Then, create a page through wordpress called “whatever” and choose “Blog” from the page attribute->template drop down. Then, whatever you put on “archive.php” will be displayed when you visit “whatever”.
Maybe that’s what you are trying to do? So you technically don’t even need the index to have that conditional comment… because the index.php page is simply a loop… that shows either a page or a post using the loop. If you want to make pages look different then posts, this is usually a good start.