{"id":2195,"date":"2017-05-30T01:32:07","date_gmt":"2017-05-30T01:32:07","guid":{"rendered":"http:\/\/www.websitedesignwebsitedevelopment.com\/?p=2195"},"modified":"2017-05-30T01:32:51","modified_gmt":"2017-05-30T01:32:51","slug":"option-field-value-not-loading-archive-page-wp_query","status":"publish","type":"post","link":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/","title":{"rendered":"Option field value not loading on Archive page &#8211; WP_Query"},"content":{"rendered":"<p><iframe loading=\"lazy\" src=\"https:\/\/www.youtube.com\/embed\/vA-mjwaHrww\" width=\"560\" height=\"315\" frameborder=\"0\" allowfullscreen=\"allowfullscreen\"><\/iframe><br \/>\n<code><br \/>\n&nbsp;<br \/>\n&lt;?php<br \/>\nglobal $development_logos;<br \/>\nadd_action('init', 'development_logos');<br \/>\nfunction development_logos(){<br \/>\nglobal $development_logos;<br \/>\n$development_logos = get_field('development_logos','option');<br \/>\n}<br \/>\nfunction dev_logos_func( $atts ){<br \/>\nglobal $development_logos;<br \/>\n$devLogos = '&lt;div id=\"logos\"&gt;';<br \/>\nforeach($development_logos as $the_row){<br \/>\n$devLogos .= '&lt;a href=\"'.$the_row['dev_url'].'\" target=\"_blank\"&gt;'.$the_row['dev_name'].'&lt;\/a&gt;&lt;div class=\"logosTxt\"&gt;'.$the_row['dev_text'].'&lt;\/div&gt;';<br \/>\n}<br \/>\n$devLogos .= '&lt;\/div&gt;';<br \/>\nreturn $devLogos;<br \/>\n}<br \/>\nadd_shortcode( 'dev_logos', 'dev_logos_func' );<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&nbsp; &lt;?php global $development_logos; add_action(&#8216;init&#8217;, &#8216;development_logos&#8217;); function development_logos(){ global $development_logos; $development_logos = get_field(&#8216;development_logos&#8217;,&#8217;option&#8217;); } function dev_logos_func( $atts ){ global $development_logos; $devLogos = &#8216;&lt;div id=&#8221;logos&#8221;&gt;&#8217;; foreach($development_logos as $the_row){ $devLogos .= &#8216;&lt;a href=&#8221;&#8216;.$the_row[&#8216;dev_url&#8217;].'&#8221; target=&#8221;_blank&#8221;&gt;&#8217;.$the_row[&#8216;dev_name&#8217;].'&lt;\/a&gt;&lt;div class=&#8221;logosTxt&#8221;&gt;&#8217;.$the_row[&#8216;dev_text&#8217;].'&lt;\/div&gt;&#8217;; } $devLogos .= &#8216;&lt;\/div&gt;&#8217;; return $devLogos; } add_shortcode( &#8216;dev_logos&#8217;, &#8216;dev_logos_func&#8217; );<\/p>\n","protected":false},"author":1,"featured_media":2196,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[65],"tags":[],"class_list":["post-2195","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-plugins"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Option field value not loading on Archive page - WP_Query - AndroidBubble Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Option field value not loading on Archive page - WP_Query - AndroidBubble Blog\" \/>\n<meta property=\"og:description\" content=\"&nbsp; &lt;?php global $development_logos; add_action(&#039;init&#039;, &#039;development_logos&#039;); function development_logos(){ global $development_logos; $development_logos = get_field(&#039;development_logos&#039;,&#039;option&#039;); } function dev_logos_func( $atts ){ global $development_logos; $devLogos = &#039;&lt;div id=&quot;logos&quot;&gt;&#039;; foreach($development_logos as $the_row){ $devLogos .= &#039;&lt;a href=&quot;&#039;.$the_row[&#039;dev_url&#039;].&#039;&quot; target=&quot;_blank&quot;&gt;&#039;.$the_row[&#039;dev_name&#039;].&#039;&lt;\/a&gt;&lt;div class=&quot;logosTxt&quot;&gt;&#039;.$the_row[&#039;dev_text&#039;].&#039;&lt;\/div&gt;&#039;; } $devLogos .= &#039;&lt;\/div&gt;&#039;; return $devLogos; } add_shortcode( &#039;dev_logos&#039;, &#039;dev_logos_func&#039; );\" \/>\n<meta property=\"og:url\" content=\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/\" \/>\n<meta property=\"og:site_name\" content=\"AndroidBubble Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453\" \/>\n<meta property=\"article:published_time\" content=\"2017-05-30T01:32:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2017-05-30T01:32:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png\" \/>\n\t<meta property=\"og:image:width\" content=\"200\" \/>\n\t<meta property=\"og:image:height\" content=\"200\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Fahad\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fahad\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/\"},\"author\":{\"name\":\"Fahad\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"headline\":\"Option field value not loading on Archive page &#8211; WP_Query\",\"datePublished\":\"2017-05-30T01:32:07+00:00\",\"dateModified\":\"2017-05-30T01:32:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/\"},\"wordCount\":11,\"image\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png\",\"articleSection\":[\"Plugins\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/\",\"url\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/\",\"name\":\"Option field value not loading on Archive page - WP_Query - AndroidBubble Blog\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png\",\"datePublished\":\"2017-05-30T01:32:07+00:00\",\"dateModified\":\"2017-05-30T01:32:51+00:00\",\"author\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"breadcrumb\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#primaryimage\",\"url\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png\",\"contentUrl\":\"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png\",\"width\":200,\"height\":200},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/androidbubble.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Development\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"PHP Frameworks\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Wordpress\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Plugins\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/plugins\/\"},{\"@type\":\"ListItem\",\"position\":6,\"name\":\"Option field value not loading on Archive page &#8211; WP_Query\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\",\"url\":\"https:\/\/androidbubble.com\/blog\/\",\"name\":\"AndroidBubble Blog\",\"description\":\"Articles &amp; Posts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/androidbubble.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\",\"name\":\"Fahad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"caption\":\"Fahad\"},\"sameAs\":[\"http:\/\/www.androidbubbles.com\/\",\"https:\/\/x.com\/phpFlex\"],\"url\":\"https:\/\/androidbubble.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Option field value not loading on Archive page - WP_Query - AndroidBubble Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/","og_locale":"en_US","og_type":"article","og_title":"Option field value not loading on Archive page - WP_Query - AndroidBubble Blog","og_description":"&nbsp; &lt;?php global $development_logos; add_action('init', 'development_logos'); function development_logos(){ global $development_logos; $development_logos = get_field('development_logos','option'); } function dev_logos_func( $atts ){ global $development_logos; $devLogos = '&lt;div id=\"logos\"&gt;'; foreach($development_logos as $the_row){ $devLogos .= '&lt;a href=\"'.$the_row['dev_url'].'\" target=\"_blank\"&gt;'.$the_row['dev_name'].'&lt;\/a&gt;&lt;div class=\"logosTxt\"&gt;'.$the_row['dev_text'].'&lt;\/div&gt;'; } $devLogos .= '&lt;\/div&gt;'; return $devLogos; } add_shortcode( 'dev_logos', 'dev_logos_func' );","og_url":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/","og_site_name":"AndroidBubble Blog","article_publisher":"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453","article_published_time":"2017-05-30T01:32:07+00:00","article_modified_time":"2017-05-30T01:32:51+00:00","og_image":[{"width":200,"height":200,"url":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png","type":"image\/png"}],"author":"Fahad","twitter_misc":{"Written by":"Fahad"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#article","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/"},"author":{"name":"Fahad","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"headline":"Option field value not loading on Archive page &#8211; WP_Query","datePublished":"2017-05-30T01:32:07+00:00","dateModified":"2017-05-30T01:32:51+00:00","mainEntityOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/"},"wordCount":11,"image":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#primaryimage"},"thumbnailUrl":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png","articleSection":["Plugins"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/","url":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/","name":"Option field value not loading on Archive page - WP_Query - AndroidBubble Blog","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#primaryimage"},"image":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#primaryimage"},"thumbnailUrl":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png","datePublished":"2017-05-30T01:32:07+00:00","dateModified":"2017-05-30T01:32:51+00:00","author":{"@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"breadcrumb":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#primaryimage","url":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png","contentUrl":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png","width":200,"height":200},{"@type":"BreadcrumbList","@id":"https:\/\/androidbubble.com\/blog\/website-development\/php-frameworks\/wordpress\/plugins\/option-field-value-not-loading-archive-page-wp_query\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/androidbubble.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Development","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/"},{"@type":"ListItem","position":3,"name":"PHP Frameworks","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/"},{"@type":"ListItem","position":4,"name":"Wordpress","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/"},{"@type":"ListItem","position":5,"name":"Plugins","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/php-frameworks\/wordpress\/plugins\/"},{"@type":"ListItem","position":6,"name":"Option field value not loading on Archive page &#8211; WP_Query"}]},{"@type":"WebSite","@id":"https:\/\/androidbubble.com\/blog\/#website","url":"https:\/\/androidbubble.com\/blog\/","name":"AndroidBubble Blog","description":"Articles &amp; Posts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/androidbubble.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7","name":"Fahad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","caption":"Fahad"},"sameAs":["http:\/\/www.androidbubbles.com\/","https:\/\/x.com\/phpFlex"],"url":"https:\/\/androidbubble.com\/blog\/author\/admin\/"}]}},"views":344,"jetpack_featured_media_url":"https:\/\/androidbubble.com\/blog\/wp-content\/uploads\/2017\/05\/icon-acf-200.png","_links":{"self":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/2195","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/comments?post=2195"}],"version-history":[{"count":2,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/2195\/revisions"}],"predecessor-version":[{"id":2198,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/2195\/revisions\/2198"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media\/2196"}],"wp:attachment":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media?parent=2195"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/categories?post=2195"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/tags?post=2195"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}