Add pagination to blog

The sweet and short of this, don’t use get_posts if you need paginated queries. get_posts works perfectly if you are going to use a custom query that doesn’t need pagination, but it really becomes a big complicated mess when you need to introduce pagination. I think the easiest and most appropriate here is to make … Read more

Is it better practice to create many page templates, or a a few base templates with custom HTML added via TinyMCE?

I use multiple templates, but also use code for some pages. For example, if I have a site with 3 sections, About, Products, and Research I would create page-about.php, page-products.php and page-research.php. These can be customized as necessary though usually they are simply pulling in unique sidebars which I want to include on all pages … Read more

strange behaviour of template_redirect in IE8

I am updated the answer, so that it will be helpfull to others as well. (For IE, IIRC it’s 512 bytes) Helpful links: https://stackoverflow.com/questions/11121286/404-page-not-showing-up-in-ie9#answer-11133855 https://stackoverflow.com/questions/3970093/include-after-php-404-header-returning-oops-this-link-appears-to-be-broken

List all pages using a specific template on a page

You can create a custom post type called blog. This would group all your “blog” posts together. Once you have that done, create a template file called archive-blog.php, this will be the file that you can use to list all your posts under the “blog” custom post type. For a single post view, the template … Read more

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