{"id":5256,"date":"2025-01-15T19:30:12","date_gmt":"2025-01-15T16:00:12","guid":{"rendered":"https:\/\/clarateam.com\/?p=5256"},"modified":"2025-11-05T07:20:40","modified_gmt":"2025-11-05T08:20:40","slug":"top-banner-code","status":"publish","type":"post","link":"https:\/\/useclara.ir\/academy\/top-banner-code\/","title":{"rendered":"\u06a9\u062f \u0628\u0646\u0631 \u062b\u0627\u0628\u062a \u0628\u0627\u0644\u0627\u06cc \u0648\u0628\u0633\u0627\u06cc\u062a"},"content":{"rendered":"<p data-pm-slice=\"1 1 []\"><strong>\u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u0628\u0646\u0631 \u062b\u0627\u0628\u062a \u0628\u0647 \u0628\u0627\u0644\u0627\u06cc \u0648\u0628\u0633\u0627\u06cc\u062a<\/strong><\/p>\n<p>\u062f\u0627\u0634\u062a\u0646 \u06cc\u06a9 \u0628\u0646\u0631 \u062b\u0627\u0628\u062a \u062f\u0631 \u0628\u0627\u0644\u0627\u06cc \u0648\u0628\u0633\u0627\u06cc\u062a \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u062a\u0623\u062b\u06cc\u0631 \u0632\u06cc\u0627\u062f\u06cc \u062f\u0631 \u062c\u0644\u0628 \u062a\u0648\u062c\u0647 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0628\u0647 \u062a\u062e\u0641\u06cc\u0641\u200c\u0647\u0627\u060c \u0627\u0637\u0644\u0627\u0639\u06cc\u0647\u200c\u0647\u0627 \u06cc\u0627 \u067e\u06cc\u0634\u0646\u0647\u0627\u062f\u0627\u062a \u0648\u06cc\u0698\u0647 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647\u060c \u06cc\u06a9 \u0631\u0648\u0634 \u0633\u0627\u062f\u0647 \u0628\u0631\u0627\u06cc \u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u0627\u06cc\u0646 \u0628\u0646\u0631 \u0628\u0627 \u0627\u0633\u062a\u0641\u0627\u062f\u0647 \u0627\u0632 \u06a9\u062f\u0646\u0648\u06cc\u0633\u06cc \u062f\u0631 \u0648\u0631\u062f\u067e\u0631\u0633 \u0622\u0645\u0648\u0632\u0634 \u062f\u0627\u062f\u0647 \u0634\u062f\u0647 \u0627\u0633\u062a.<\/p>\n<h4><\/h4>\n<h4 style=\"text-align: justify;\">\u0631\u0648\u0634 \u067e\u06cc\u0627\u062f\u0647 \u0633\u0627\u0632\u06cc\u061f<\/h4>\n<p style=\"text-align: justify;\">\u0645\u0631\u0627\u062d\u0644 \u0632\u06cc\u0631 \u0631\u0627 \u0628\u0631\u0627\u06cc \u0627\u0639\u0645\u0627\u0644 \u0627\u06cc\u0646 \u06a9\u062f \u062f\u0646\u0628\u0627\u0644 \u06a9\u0646\u06cc\u062f:<br \/>\n\u0648\u0627\u0631\u062f \u0628\u062e\u0634 \u0645\u062f\u06cc\u0631\u06cc\u062a \u0648\u0631\u062f\u067e\u0631\u0633 \u062e\u0648\u062f \u0634\u0648\u06cc\u062f.<br \/>\n\u0628\u0647 \u0645\u0633\u06cc\u0631\u00a0\u0646\u0645\u0627\u06cc\u0634\u00a0&gt;\u00a0\u0648\u06cc\u0631\u0627\u06cc\u0634\u06af\u0631 \u0642\u0627\u0644\u0628\u00a0\u0628\u0631\u0648\u06cc\u062f.<br \/>\n\u0641\u0627\u06cc\u0644\u00a0function.php\u00a0\u0642\u0627\u0644\u0628 \u062e\u0648\u062f \u0631\u0627 \u067e\u06cc\u062f\u0627 \u06a9\u0631\u062f\u0647 \u0648 \u0628\u0627\u0632 \u06a9\u0646\u06cc\u062f.<br \/>\n\u06a9\u062f \u0632\u06cc\u0631 \u0631\u0627 \u062f\u0631 \u0627\u0646\u062a\u0647\u0627\u06cc \u0641\u0627\u06cc\u0644\u00a0function.php\u00a0\u0627\u0636\u0627\u0641\u0647 \u06a9\u0646\u06cc\u062f:<\/p>\n<p>[php]<\/p>\n<p>function add_fixed_image_above_header() {<br \/>\n    \/\/ \u0622\u062f\u0631\u0633 \u062a\u0635\u0648\u06cc\u0631 \u0645\u0648\u0631\u062f \u0646\u0638\u0631<br \/>\n    $image_url = &#8216;https:\/\/sitemane.com\/your_image_name.gif&#8217;;<\/p>\n<p>    \/\/ \u0686\u0627\u067e CSS \u0648 HTML<br \/>\n    echo &quot;<br \/>\n    &lt;style&gt;<br \/>\n    .whb-main-header, header {<br \/>\n        margin-top: 41px;<br \/>\n    }<br \/>\n    .fixed-image-above-header {<br \/>\n        position: fixed;<br \/>\n        top: 0;<br \/>\n        left: 0;<br \/>\n        width: 100%;<br \/>\n        z-index: 9999;<br \/>\n        background-image: url(&#8216;$image_url&#8217;);<br \/>\n        background-size: contain;<br \/>\n        background-repeat: no-repeat;<br \/>\n        height: 150px; \/* \u0627\u0631\u062a\u0641\u0627\u0639 \u062a\u0635\u0648\u06cc\u0631 *\/<br \/>\n    }<br \/>\n    body {<br \/>\n        margin-top: 41px; \/* \u062c\u0627 \u0628\u0627\u0632 \u06a9\u0631\u062f\u0646 \u0628\u0631\u0627\u06cc \u062a\u0635\u0648\u06cc\u0631 \u062b\u0627\u0628\u062a *\/<br \/>\n    }<br \/>\n    &lt;\/style&gt;<br \/>\n    &lt;a href=&#8217;#&#8217; class=&#8217;fixed-image-above-header&#8217;&gt;&lt;\/a&gt;<br \/>\n    &quot;;<br \/>\n}<br \/>\nadd_action(&#8216;wp_head&#8217;, &#8216;add_fixed_image_above_header&#8217;);[\/php]<\/p>\n<h4 style=\"text-align: justify;\">\u062a\u0648\u0636\u06cc\u062d \u06a9\u062f<\/h4>\n<p style=\"text-align: justify;\">\u0628\u0627 \u062c\u0627\u06cc https:\/\/banners\/2.gif \u0622\u062f\u0631\u0633 \u0628\u0646\u0631 \u062e\u0648\u062f \u0631\u0627 \u0642\u0631\u0627\u0631 \u062f\u0647\u06cc\u062f.<\/p>\n","protected":false},"excerpt":{"rendered":"\u0627\u0636\u0627\u0641\u0647 \u06a9\u0631\u062f\u0646 \u0628\u0646\u0631 \u062b\u0627\u0628\u062a \u0628\u0647 \u0628\u0627\u0644\u0627\u06cc \u0648\u0628\u0633\u0627\u06cc\u062a\n\u062f\u0627\u0634\u062a\u0646 \u06cc\u06a9 \u0628\u0646\u0631 \u062b\u0627\u0628\u062a \u062f\u0631 \u0628\u0627\u0644\u0627\u06cc \u0648\u0628\u0633\u0627\u06cc\u062a \u0645\u06cc\u200c\u062a\u0648\u0627\u0646\u062f \u062a\u0623\u062b\u06cc\u0631 \u0632\u06cc\u0627\u062f\u06cc \u062f\u0631 \u062c\u0644\u0628 \u062a\u0648\u062c\u0647 \u06a9\u0627\u0631\u0628\u0631\u0627\u0646 \u0628\u0647 \u062a\u062e\u0641\u06cc\u0641\u200c\u0647\u0627\u060c \u0627\u0637\u0644\u0627\u0639\u06cc\u0647\u200c\u0647\u0627 \u06cc\u0627 \u067e\u06cc\u0634\u0646\u0647\u0627\u062f\u0627\u062a \u0648\u06cc\u0698\u0647 \u062f\u0627\u0634\u062a\u0647 \u0628\u0627\u0634\u062f. \u062f\u0631 \u0627\u06cc\u0646 \u0645\u0642\u0627\u0644\u0647\u060c \u06cc\u06a9 \u0631\u0648\u0634 \u0633\u0627\u062f\u0647 \u0628\u0631\u0627\u06cc \u0627\u0636\u0627\u0641...","protected":false},"author":1,"featured_media":5276,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[103,108],"tags":[],"class_list":["post-5256","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-articles","category-articles-web-design"],"_links":{"self":[{"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/posts\/5256","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/comments?post=5256"}],"version-history":[{"count":0,"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/posts\/5256\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/media\/5276"}],"wp:attachment":[{"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/media?parent=5256"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/categories?post=5256"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/useclara.ir\/academy\/wp-json\/wp\/v2\/tags?post=5256"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}