Why Does get_page_by_path Return The Sample Post?

If the page doesn’t exist, then get_page_by_title() returns null, which when passed into get_page_link() still returns a URL, which could conceivably redirect to the sample post. Check the value of get_page_by_title() is valid before using.

Header and Footer options in pages and posts

You can do this by Using template page as well as custom fields. Let us say your custom fields value are 1 and 2 for header your conditions will be. if($header==1) { get_header(1); } else {get_header();} And similarly for footer it will be if($footer==1) { get_footer(1); } else { get_footer(); }

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