fracmo2000
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Tidy up icons after postCan anybody help this css noob out?
Cool, thanks for lettings us know…I will keep checking back ๐
Forum: Fixing WordPress
In reply to: Is there a smart way to use Next/Previous post button?sure no worries, fracmo2000 [at] yahoo [com]…that sounds good to me patv ๐
Forum: Fixing WordPress
In reply to: Is there a smart way to use Next/Previous post button?Hi Abhishek, sorry I will use the websites you mentioned for future code/questions. I couldnt see a pm funtion or webite/email for patv…will again will keep that in mind for the future. Thanks for letting me know.
I’m also getting the dreaded error 500 (blank page)…tried in both FF + IE. I run my website on a shared host, is that the problem?
Forum: Fixing WordPress
In reply to: Is there a smart way to use Next/Previous post button?It still works, but Im guessing its single.php…
If you have a website with paypal (or a personal paypal acc?) I can make a donation as I know your going out your way here.
Forum: Fixing WordPress
In reply to: Is there a smart way to use Next/Previous post button?I was going to, but deleted it (post that was before your most current reply). Wanted to wait and see if you replied…which you did ๐
Ok, so here it goes, category with viewpost=category
<?php global $wp_query; $args = array( 'post_type' => 'post', 'posts_per_page' => 18, 'paged' => ( get_query_var('paged') ? get_query_var('paged') : 1), ); $final_args = array_merge( $wp_query->query, $args ); query_posts($final_args); $x = 0; while (have_posts()) : the_post(); ?> <?php if($x == 0) { ?> <div class="featured_box first"> <?php } elseif($x == 5) { ?> <div class="featured_box last"> <?php } else { ?> <div class="featured_box"> <?php } ?> <a>"><?php tern_wp_youtube_image(); ?> </a><a>"><?php the_post_thumbnail('featured-small'); ?></a> <h3><a>?viewpost=category"><?php the_title(); ?></a></h3>Single.php, this is where I got confused:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?> <h1><?php the_title(); ?></h1> <?php if($single) { ?> <?php } ?> <p> <?php the_content(); ?></p> <br /><br /> <?php if(isset($_GET['viewport']) && $_GET['viewport'] == 'category'){ //handle your links as if they came from the category listing }else{ //handle your links as if they came form the homepage or from another listing } ?> <div><h4><span><?php next_post('% โนโนโน', 'Previous', 'no', 'no'); ?></span> <span> <div class="right"><?php previous_post('โบโบโบ %', 'Next', 'no', 'no'); ?></span> </h4></div> <br /><br />Forum: Fixing WordPress
In reply to: Is there a smart way to use Next/Previous post button?Patv, sorry but Im strugging the with setting up a custom query and how to combine it all. I hope its not too much to ask, but could I post up the category/Single.php here and you see what you think?
Forum: Fixing WordPress
In reply to: Is there a smart way to use Next/Previous post button?Hi again patv, thanks for checking back. Im glad you did, your a php wizard ๐
Ok, I added ‘?viewport=category’ to my category.php and noticed the urls change from
website.com/questions-no-one-knows-the-answers-to/
To this
website.com/questions-no-one-knows-the-answers-to/?viewpost=category
Which looks promising! Im now trying to add your $_GET command to my next/previous buttons. Just to clarify, the custom query should go where you have //handle your links? No success yet, but I will keep trying till I get this…finishing work soon so will try again when I get home.
Cheers again, its very much appreciated.
Forum: Fixing WordPress
In reply to: Is there a smart way to use Next/Previous post button?Hi Abhishek, thanks for your input. I will install that plugin and mess around with it. Im still trying to firgue out the method that patv talked about, maybe a plugin would be an easier route for me to go down.
Cheers guys, all help welcome ๐
Forum: Fixing WordPress
In reply to: Display certain post categories under post titleIn demand haha. Ok, I will send it over ๐
Forum: Fixing WordPress
In reply to: Is there a smart way to use Next/Previous post button?I have been trying to get my head round this since you posted. I use this to display the categories on my index.php, which links to the category page:
<?php // For each of the categories, create them as category variables foreach((get_the_category()) as $category) { // If the category is NOT the cat_name (category name) then echo some stuff // So grab all... except where they match cat_name (exclude basically) if ($category->cat_name != 'Featured Small') { echo '<a href="' . get_category_link( $category->term_id ) . '" title="' . sprintf( __( "View all posts in %s" ), $category->name ) . '" ' . '>[' . $category->name.']</a> '; //added [ = [ and ] = ] } } ?>As you can tell, somebody wrote that code for me…In new to the world of php.
So i amend that with
<a href="<?php the_permalink($post->id);?>?view=category">link to post form category listing</a>Lets hope so, otherwise im screwed.
Forum: Fixing WordPress
In reply to: Display certain post categories under post titleAlmost forgot, thanks for checking back and for the help with the code…really appreciated.
One more thing and Im ready to go live!
Forum: Fixing WordPress
In reply to: Display certain post categories under post titleprob easier if I could show you, I will try this:
Post Tile
Image
Fail Funny Ouchto this
Post Tile
Image
[Fail] [Funny] [Ouch]I just didnt want plain txt or little icons to differentiate between categries, as I dont usually like that myself. The cat titles are small and seemed to run into each other, just looked like a bundle or words together. I also dont have a post description (setup magazine style 6 columns by 4 rows), so my thinking was to give the user a little info on the post. Less is more kinda thing.
I dont knwow how to pm, unsure about posting my site up as its not finished yet.