Get the current hierarchy php page

Assuming that you’re wanting to determine which template page is currently being displayed, within the template hierarchy, the easiest way to do so is via the output of body_class(). However, if you need to return this information programmatically, the easiest way might be to call get_body_class(), and then evaluate the array of classes returned. Given … Read more

Which page is referring to *all posts by author*?

please refer to the codex: http://codex.wordpress.org/Template_Hierarchy#Author_display however, your problem is caused by a conflict of the .author class output by the body_class() and this existing style in custom.css: .author { float: left; margin-top: -3px; width: 219px; background: #E7ECEF; border-right: 1px solid #D6DFDC; height: 41px; cursor: pointer; } check why this style is added there in … Read more

How can I sort posts ascending by post title for a specific post type, but on a category archive template?

You can use pre_get_posts to hook in and change the query. The argument passed to pre_get_posts is the query object. It fires for every query, so you need to check some things first. Quick example (not-tested) — change the order on only the video type’s post type archive page. <?php add_action(‘pre_get_posts’, ‘wpse73991_change_order’); function wpse73991_change_order($q) { … Read more

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