Pagination on child category returns 404

There are a lot of questions here regarding pagination, it is definitely one of the least understood aspects of how WordPress works internally. To understand why you get 404s, we’ll start by looking at the Action Reference in Codex to see the process WordPress follows for each request. The process begins by loading up the … Read more

Custom Loop Pagination on WordPress

Edit So, the reason that this isn’t working is because you’ve modified the question to specify that this is happening in a custom page template. Since this is the case, you’ll need to use two separate custom queries, and won’t need to bother with filtering the main query via pre_get_posts. The first query will be … Read more

Changing Link Attributes for Wp_Link_Pages

There is no filter for the URLs, and no filter for the complete output of wp_link_pages(). But you can get the output as string if you pass ‘echo’ => FALSE as argument. There are four options: Write a modified copy of the function with the URLs you need. You will miss all further improvements which … Read more

Show posts of one category only with Custom Taxonomy on single.php

Since I’m not sure if you are using single.php for anything else, I am going to suggest that you copy single.php to single-14kgs.php in the theme directory. Once you have done that, modify the following: <?php next_posts_link(); ?> becomes… <?php next_post_link(‘%link’,’%title’,TRUE) ?> and <?php previous_posts_link(); ?> becomes… <?php previous_post_link(‘%link’, ‘%title’, TRUE); ?> The third argument … Read more

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