Code to Show for One post only in head

Write a function, and define it as a callback on the wp_head hook: <?php /** * print a alternate link on head for a several post * * @wp-hook wp_head * @return void */ function wpse_162849_print_alternate_link() { //don’t do anything expect on singular pages if ( ! is_singular() ) return; // check the global post … Read more

save_post hook – headers already sent?

Saving post doesn’t just happens. Either you are submitting a form or ajax request, which spins up new copy of WP core, which does the saving. Typically that process isn’t meant to produce output and isn’t handling it accordingly. Depending on what you want to accomplish you will have to either use pure JavaScript for … Read more

Reduce Page loading time

W3TC has an option called Page Cache that will render all your dynamic pages into static HTML and deliver that instead of rendering the page every page load. This reduces loading time a lot and I suggest you turn it on and give it a try.

Change header menu login-logout without changing main menu

You should add a class to the header when the user is logged in, this way, only your css would have to change. You can do it like this in your header.php file : <header class=”header clear <?php echo ((is_user_logged_in())?’logged-in-header’:’not-logged-in-header’); ?>” role=”banner”>

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