{"id":7351039,"date":"2016-05-05T11:47:45","date_gmt":"2016-05-05T11:47:45","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/customize-header-and-menu-button-problem\/"},"modified":"2016-08-31T17:17:27","modified_gmt":"2016-08-31T17:17:27","slug":"customize-header-and-menu-button-problem","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/customize-header-and-menu-button-problem\/","title":{"rendered":"customize header and menu button problem"},"content":{"rendered":"<p>i am using socialchef theme.<br \/>\ni want to create 2different menu buttons in the header.<br \/>\none for logged in users. and one for NOT logged in users.<br \/>\nhere is my default header look like.<br \/>\nhttp:\/\/uupload.ir\/files\/65gv_true_header.jpg<br \/>\nand here are the codes for those 3 buttons.<br \/>\nhttp:\/\/uupload.ir\/files\/eit3_true_code.jpg<\/p>\n<p>i want to create a situation, where if a user is logged in<br \/>\nthose 3buttons appear as &#8220;search for recipe&#8221;, &#8220;my account&#8221;, &#8220;submit a recipe&#8221;.<\/p>\n<p>and if a user is NOT logged in, those 3 buttons appear as<br \/>\n&#8220;search for recipe&#8221; , &#8220;LOG IN&#8221; , submit a recipe<\/p>\n<p>so i used if ( is_user_logged_in() ) to know that if a user us logged in or not. and changed the codes and added an<br \/>\nif ( is_user_logged_in() )<br \/>\n{&#8230;}<br \/>\nelse<br \/>\n{&#8230;}<\/p>\n<p>take a look at the changes i added to default code here:<br \/>\nhttp:\/\/uupload.ir\/files\/beo_changed_code_of_header_caused_error.jpg<br \/>\nand the results look like this:<br \/>\n1) http:\/\/uupload.ir\/files\/zx2t_error_header_1_-_zoomed_out.jpg<br \/>\n2) http:\/\/uupload.ir\/files\/irj4_error_header_1_-_more_zoomed_out.jpg<br \/>\nas you see the menu repeated it self!<\/p>\n<p>how can i fix that error and make my changes? tnx for help.<\/p>\n","protected":false},"template":"","class_list":["post-7351039","topic","type-topic","status-publish","hentry","topic-tag-button","topic-tag-header"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7351039","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/7351039\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=7351039"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}