Skip to content

Tag: wordpress

WordPress IF ELSEIF and ELSE Statement

Can someone explain why this does not work? Basically if not the home page or a page with ID 105 show the contact form, else if it is the home page show ‘no side bar’ else for everything else show ‘different side bar’ – it doesnt work as the home page still shows the ‘diffe…

is_page and query_posts not working correctly

For some reason the following code is displaying both types of posts instead of just the specified post using query_posts. I am not quite sure what is going on, but it appears that the loop is ignoring my condition of is_page(‘news’) or is_page(‘othernews’). Does anyone have an idea wh…

get the current page id inside wordpress plugin page

I need to get the current page id in WordPress plugin page outside the loop. And the code I wrote for getting current page id is in my plugin page. I tried many codes, but doesn’t work But it doesn’t work for me . This is also not working. When I try Then a error message appears Fatal error: Call