lynkei
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: how to add a css class to latest post?thanks a lot, esmi. I appreciate your help.
That does exactly what I wanted to do.
Forum: Fixing WordPress
In reply to: how to add a css class to latest post?esmi, it sounds like we could be on the right track.
The only problem is my knowledge of php is quite limited. Do you care to explain how I would do that?
I am using the following code btw.
<?php if ( have_posts() ) : ?> <?php while ( have_posts() ) : the_post(); ?> <div class="NEW CLASS GOES HERE"> <?php if( get_post_meta($post->ID, "image_link", true) ): ?> <a href="<?php the_field('image_link'); ?>" target="_blank"> <?php endif; ?> <?php if( get_post_meta($post->ID, "image", true) ): ?> <img src="<?php the_field('image'); ?>" border="0" style="float: left;"/> <?php endif; ?> <?php if( get_post_meta($post->ID, "image_link", true) ): ?> </a> <?php endif; ?> <div style="width: <?php the_field('text_box_width'); ?>px;"> <h2> <?php the_title(); ?> </h2> <span class="date"> <?php the_time( 'M j y' ); ?> | </span><span class="author"> <?php the_author(); ?> </span> <?php the_content(); ?> </div> </div> <?php endwhile; /* rewind or continue if all posts have been fetched */ ?> <?php endif; ?>Forum: Fixing WordPress
In reply to: how to add a css class to latest post?To better explain.
If I use the solutions in many of the search results I will get the following:Main Blog Page
Latest Post (New)
2nd Latest Post
3rd Latest Post
4th Latest Post
5th Latest Post
So on…Category 1 Page
Latest Post (New)
3rd Latest Post
So on…Category 2 Page
2nd Latest Post (New)
4th Latest Post
5th Latest PostCategory 2 Page is where the issue arrives. I don’t want that 2nd latest post to be styled with the new class. but since that 2nd latest post is the first post in the Category 2 page it will be styled new. Maybe I’m missunderstanding something?
ThanksForum: Fixing WordPress
In reply to: how to add a css class to latest post?Andrew, that would work except that I have a couple categories. So if I go into category 1 the newest item will have that class even if the newest item is in category 2, for instance.
esmi, the above stated reason is why I haven’t been able to find a solution by searching for what you specified.
Forum: Fixing WordPress
In reply to: single-[post_type] templates suddenly quit workingFor anyone who might stumble across this….I fixed it by adding the following code after my register_post_type code in my functions.php file.
flush_rewrite_rules( false );Forum: Fixing WordPress
In reply to: How do I make a template for items with custom post type?Thanks a lot Rev. Voodoo. That’s what it took.
Forum: Fixing WordPress
In reply to: use specified template for all post within specific categorySorry, meant to mark as resolved.
Forum: Fixing WordPress
In reply to: use specified template for all post within specific categoryActually, as a matter of fact that has_category function would do it.
Thanks for your help
Forum: Fixing WordPress
In reply to: use specified template for all post within specific categoryThanks “bythegram” for your quick reply.
Basically here’s the deal, I actually have custom fields set up using the “advanced custom fields” plugin. uncategorized items actually have different fields then ones under the other categories.
So what I’m trying to do is specify a page template for the different categories to display that info in the way I want it to.
The post_class in that case won’t help me and if I’m understanding it right the get_template_part is not actually for templating pages rather loops etc? If so I don’t think that solves my issue. Or maybe i’m understanding this incorrectly?
ThanksForum: Fixing WordPress
In reply to: Remove copyright on bottom. blackbird themeHave you checked the footer.php template file? There’s a good chance it is in there.
Forum: Fixing WordPress
In reply to: Use another custom post type as parentJust marking this as resolved so noone wastes any time on answering it since in the meantime I took a different route.
ThanksForum: Fixing WordPress
In reply to: Restrict Post Type: Page from editor roleThanks a lot,
It looks like White Label CMS in itself does what I want to do. Thank you for the recommendation.Forum: Fixing WordPress
In reply to: Displaying the_content in a foreach loopThanks keesiemeijer,
That did it.I’m actually not sure why I didn’t use a normal query. I’m relatively new to wordpress and it may have just been due to not really thinking through what I was doing.
Thanks, againForum: Fixing WordPress
In reply to: Clicking the Submit Comment button takes me to "page not found"just for what it’s worth. I am using the following code to display the comments form, etc.
<?php if (have_posts()) : while (have_posts()) : the_post();?> <?php the_content(); ?> <!-- I am using the follow code to display the comments --> <?php comments_template(); ?> <!-- end of comment code --> <?php endwhile; endif; ?>Forum: Fixing WordPress
In reply to: Clicking the Submit Comment button takes me to "page not found"here is a link to my testing server.
http://spectre.megaspace.ca/~dundalkl/products-indoor-furniture/bedroom-furniture/mountain-lodge/mountain-lodge-bed-room/I have tried switching to the default permalink structure and it still didn’t work. And it’s definately my preference to use the postname permalink option.