Rose
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Comma between subcategory listThank you. I actually figured out an alternative using css. ??
Forum: Fixing WordPress
In reply to: Limit characters in a custom fieldIt worked! Thank you!
Forum: Fixing WordPress
In reply to: HackedWow, okay, I wasn’t really thinking. Rather than re-installing, I set about overwriting files–and wouldn’t you know it, I found the culprit? Someone had added that ugly mess to my index.php file in the main directory. I’m not sure why I never thought of that particular file; in retrospect it’s pretty obvious. ??
Forum: Fixing WordPress
In reply to: HackedUpdate: I just went through and deactivated all my plugins. No change. I’m going to assume that something is up with my wordpress installation.
Forum: Fixing WordPress
In reply to: Category pages showing ALL posts rather than specific category…It just occurred to me that I’m thinking about this incorrectly. I’m pretty sure whatever is wrong must be somewhere in my code that is intended to display my posts in a 3-column table:
<table class="results"> <?php // Show a selected number of posts per row $posts_per_row = 3; $posts_per_page = 12; $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $args = array( 'posts_per_page' => $posts_per_page, 'paged' => $paged, ); query_posts($args); if (have_posts()) { while (have_posts()) { the_post(); if ((++$post_counter % $posts_per_row) == 1 || $posts_per_row == 1) { if ($post_counter > 1) { echo "</tr><!-- End of post_row -->"; // End previous row } echo "<tr>"; // Start a new row } echo "<td class=result>"; // Start one post // Output post data here echo '<span class=date>Released ';the_time('F j, Y');echo ' at ';the_time();echo '</span>'; echo '<h1><a href="';the_permalink();echo '">';the_title();echo '</a></h1>'; if (get_post_meta($post->ID, 'author', false)) { echo '<blockquote>written by ';$metas = get_post_meta($post->ID,'author',false); if(count($metas) >1) { echo 'Multiple Authors'; } else { echo $metas[0]; } echo '<br />'; } if(get_post_meta($post->ID, 'summary', true)) { echo '<blockquote>';echo get_post_meta($post->ID, 'summary', true); echo '</blockquote>'; } } echo "</td><!-- End of post_class -->"; // End of post } ?> <!-- End of post_row --> <?php } else { // Code for no posts found echo "<tr><td colspan=3><p>No posts found.</p></td></tr>"; } ?> </table>
Any idea where the problem is?
Try:
:Any,Chairman and CEO,President,Managing Director,Principal,Director,Vice President
Forum: Themes and Templates
In reply to: WP-CreativixI found a solution! There’s probably a much cleaner way of doing this, but after searching the forums and doing some more experimentation, I made this work for me.
Insert the following into functions.php:
function postimage() { if ( $images = get_children(array( 'post_parent' => get_the_ID(), 'post_type' => 'attachment', 'numberposts' => 1, 'post_mime_type' => 'image',))) { foreach( $images as $image ) { $attachmenturl=wp_get_attachment_url($image->ID); echo ''.$attachmenturl.''; } } else { $bloginfo = bloginfo('template_directory'); echo $bloginfo."/images/add-feat.png"; } }
Replace the index.php code I indicated in my first post with the following:
[Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]
I’m certain that my way makes parts of the code redundant, but the slideshow now draws on attached images rather than a custom field, so yay?
Also inserting the following code in single.php (or wherever appropriate) will call up the raw image url:
<?php postimage(); ?>
Forum: Fixing WordPress
In reply to: Pulling up "tag #1" and "category #1" but not "category #2"…I haven’t figured out how to do this, but I figured out an acceptable alternative.
Forum: Fixing WordPress
In reply to: Show muliple results of custom field in alphabetical orderThank you, this worked perfectly. And thanks for the links too!
Forum: Fixing WordPress
In reply to: Add PHP inclue within the post contentThat sounds promising. I’ll give it a shot!
Forum: Fixing WordPress
In reply to: Add PHP inclue within the post contentP.S. I found a plugin that will display the text of an include, but won’t run the actual PHP code within the include. Huh.
Forum: Fixing WordPress
In reply to: Add PHP inclue within the post contentI’m not really familiar with that. Would that replace the content entirely? That’s not really what I’m trying to do. At this point, I’m considering placing ALL content in custom fields and ignoring the content box entirely. If I can make shortcodes work in custom fields, that might be the easiest all the way around.
Forum: Plugins
In reply to: [WP Download Monitor] Add new file extensionI finally found it! The document that needs to be edited is downloadable_file.class.
Forum: Fixing WordPress
In reply to: Seperate multiple values in get_post_meta with commas…Awesome! I knew there must be an easy way to do this. <3
Forum: Installing WordPress
In reply to: Moving installation?Thank you. I haven’t tried it yet, but it looks straightforward enough.