startribe
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Tag Conditional PHP solutionKaf! First let me say I’m a fan. I love your plugins… especially the_excerpt_reloaded!
As for your question, first I will explain the overall objective, and this will lead into the answer to the tag query.I’m setting up WordPress to manage my projects. I create a master-post to represent the project. Inside of the master-posts are notes/journals on the progress of the project; I was using lists, but I wanted it to be dynamic. So I picked up a plugin that allows me to create a loop within a loop through the post, i.e., the master-post. I’m using tag queries to call these sub-posts into the master-posts. Last, I wanted all latest notes/sub-posts from all projects/master-posts to show up on the project category pages, or home page if desired; most importantly I wanted sub-posts listed on the project category pages to have a reference to the original project page, where all sub-posts are listed with the formal project post, the master-post.
So… each sub-post is tagged with it’s master-project’s slug, and I thought, “There it is… I will put a conditional statement where if a tag is “example-master-post” then it queries for the “example-master-post” post.
I couldn’t get your primary script to work, but I think I needed to describe more. Anyhow, I took what you gave me and, with extreme luck/guessing, tweaked it a bit so it shows the slug. And it works! Here is is:
<?php global $wp_query; $tag = $wp_query->get_queried_object(); } elseif( is_tag($tag->slug) ) { query_posts('name=' . $tag->slug); } ?>Anyhow, thanks Kaf. I look up to your work.
Forum: Developing with WordPress
In reply to: WP Query DescendingOh jeeze, that was my last solution… and I went through a series of tests with other code before officially trying that one, and it worked.
Thanks 🙂
Forum: Developing with WordPress
In reply to: Loop and Commment SolutionI’m sure some code maybe redundant… and there is a better way, because I’m so new at this. So any additional suggestions to clean it up are welcome; otherwise this is resolved.
Thanks!
Forum: Developing with WordPress
In reply to: Loop and Commment SolutionRESOLVED!
I stopped trying to run into the brick wall, found the doorway, and it was through ending the first loop from the main post before beginning a new independent and refreshed comment loop. It worked!
Here is my final code:
<?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div class="post" id="post-<?php the_ID(); ?>"> <h2><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></h2> <p class="postmetadata"><?php the_time('m.d.y') ?> - <?php the_tags('Tags: ', ', ', '<br />'); ?> Posted in <?php the_category(', ') ?> | <?php edit_post_link('Edit', '', ' | '); ?> <?php comments_popup_link('No Comments »', '1 Comment »', '% Comments »'); ?></p> <div class="post_entry"> <?php the_content('read more »'); ?> <?php wp_link_pages(); ?> </div> <?php endwhile; ?> <?php endif; ?> <?php rewind_posts(); ?> <?php if (have_posts()) : ?> <?php while (have_posts()) : the_post(); ?> <div id="comments"> <?php comments_template(); // Get wp-comments.php template ?> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php next_posts_link('« Older Entries') ?></div> <div class="alignright"><?php previous_posts_link('Newer Entries »') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center">Sorry, but you are looking for something that isn't here.</p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> </div>Forum: Developing with WordPress
In reply to: Loop and Commment SolutionOk, I figured out the comment displayed on the main page is the one associated with the last comment:
http://joelsimone.com/content/?p=43#comment-9So it looks like I need to reset the loop in some way, or to get the loop to re-recognize the main loop query again. I was assuming this would be put before the comment section.
I’m doing my best, but I’m still new to php and programming, so any help is greatly appreciated.
Forum: Developing with WordPress
In reply to: Post Query for TagsAwesome! Thanks!
Forum: Plugins
In reply to: post imageAlso, could a moderator please move this into the appropriate forum; I accidentally put it in installation.
Forum: Plugins
In reply to: post imageAhhhh! I figured it out!
Ok, I searched around on Kaf’s blog and found a comment about changing some code around in the plugin. The comment linked to this post on a forum:
WordPress Post Images/IconsI followed the instructions in the post, and it worked. The plugin now works for pages!
So for anyone who runs into the same problem as I did, there’s the solution.
Forum: Plugins
In reply to: post imageI just realized that I posted this in the installation section. Could a moderator move it to the custom/design forum?
Also, as another note, I checked the html, and the plugin is processing the image tag as:
<img class="post-image" src="" title="" alt="" />For some reason it’s not picking up the needed info. Also, the plugin works fine on my category pages. Could I make a small change in the source file that will make this work on a page template?
Again, any help is appreciated!
Forum: Themes and Templates
In reply to: Comment Posting ProblemOh my goodness… it just worked!
I’m not sure what it was, but there are two possibilities:
- The internet connection- I relocated to a different internet connection, and issue may have been associated with that particular connection. I also tried a different computer and different browser at the old location, both resulting in the same issue.
- The server- I am developing on a shared server, and this limits the ability to reset the server and etc. Maybe this was the issue, I needed a refresh.
Also worth noting, maybe it is a combination of the two. Anyhow, I just wanted to post a follow-up and update. In the future, maybe someone will find this “vague diagnostic” useful.
Fingers uncrossed and getting ready to have a glass of wine…
OrionForum: Everything else WordPress
In reply to: Magento – WP Friendly Cart!For sure, Roy. I received a lot of help from the WP community on past projects, and I think WP and Magento could be something special.
Forum: Plugins
In reply to: Multiple Latest Posts – CategoriesNow I too widely know 🙂
Great feedback, thank you.
A work around is to select both the subcategory and it’s parent when posting.
Thanks again Moshu, you have helped me many times.
Sincerely,
OrionForum: Plugins
In reply to: Multiple Latest Posts – CategoriesHey Moshu,
Good to hear from you… it’s been a while. I skipped past your post when I found something that started working, sorry about that.
I thought I made tweeks, in accordance to what Kaf mentioned, but for some reason it wasn’t working. It must of been human error somewhere on my part.
Any idea on a category solution to what I mentioned above?
Thanks,
OrionForum: Plugins
In reply to: Multiple Latest Posts – CategoriesOK, I found the solution. I was doing test posts with categories that had only one post in them. By taking away “offset=1” everything works fine. So the solution is:
$myposts = get_posts('numberposts=2&&category=1'); foreach($myposts as $post) : ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> --- <?php the_excerpt_reloaded(15, '', 'none', TRUE, '', FALSE, 2); ?></li> <?php endforNow I have an additional question. I have some sub categories, and I noticed that this function doesn’t seem to include the posts of those sub-categories when selecting a parent id, e.g., category 1 is the parent to categories 3 & 4, and when I enter category “1” into the code above, I am not given the posts from categories 3 & 4… like a category page works. Instead I am given only those that are specifically filed under category 1. Any idea on how we can modify the code to work accordingly?
Thanks,
OrionForum: Plugins
In reply to: Multiple Latest Posts – CategoriesAh Ha! I found a solution that wasn’t working for someone else but it works for me!
http://wordpress.org/support/topic/106314?replies=1<?php $myposts = get_posts('numberposts=5&offset=1&category=1'); foreach($myposts as $post) : ?> <li><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> --- <?php the_excerpt(); ?></li> <?php endforeach; ?>edit:
I thought I found a solution. This is working fairly buggy. It isn’t pulling the correct number of posts, and some categories aren’t working… so still searching.