next and previous year month and day for archive page

thank u all i just did a simple code to get what i want <?php $prevyear = date(‘2150’) – 0001; $nextyear = date(‘2150′) + 0001; $prevmonth = date(’01’) – 01; $nextmonth = date(’01’) + 01; echo echo get_year_link($prevyear).”<br />”.get_year_link($nextyear).”<br />”.get_year_link($prevmonth).”<br />”.get_year_link($nextmonth).”<br />”; ?>

get_previous_post in same categories

get_previous_post uses get_adjacent_post() which has a bunch of filter hooks you can use but a much simpler approach would be to create your own function, something like this: // Create a new filtering function that will add our where clause to the query function date_filter_where( $where=”” ) { global $post; $where .= ” AND post_date … Read more

get_previous_post not working as expected

Depending on context, you may need global $post; first, so you’re not operating on a different local var. You also already have a post object, so you could just assign that directly to $post before calling setup_postdata… However, you can skip all that and use functions that accept a post object argument- $prevPost = get_previous_post(true); … Read more

Previous & Next on Index Page broken

I had the exact same problem a while ago on one of my themes. My problem was that the theme used query_post to filter out some posts. This caused the pagination to fail. I think this was the code that solved it: <?php if ( is_home() ) { $paged = (get_query_var(‘paged’)) ? get_query_var(‘paged’) : 1; … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)