{"id":568,"date":"2016-09-19T17:10:02","date_gmt":"2016-09-19T17:10:02","guid":{"rendered":"https:\/\/buddydev.com\/mediapress\/?p=568"},"modified":"2016-09-19T17:10:02","modified_gmt":"2016-09-19T17:10:02","slug":"disable-automatic-gallery-cover-update-for-mediapress","status":"publish","type":"post","link":"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/","title":{"rendered":"Disable automatic gallery cover update for MediaPress"},"content":{"rendered":"<p>Do you want to disable the automatic setting of cover by the MediaPress. If you diable it, MediaPress will not set the firt image as the cover of image galleries. You can use the following code.<\/p>\n<pre class=\"lang:default decode:true \">add_filter('mpp_gallery_auto_update_cover', '__return_false' );<\/pre>\n<p>Interested in looking at the actual code? Please see <a href=\"https:\/\/github.com\/buddydev\/mediapress\/blob\/master\/core\/gallery\/mpp-gallery-cover-templates.php#L32\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Do you want to disable the automatic setting of cover by the MediaPress. If you diable it, MediaPress will not set the firt image as the cover of image galleries. You can use the following code. add_filter(&#8216;mpp_gallery_auto_update_cover&#8217;, &#8216;__return_false&#8217; ); Interested in looking at the actual code? Please see here.<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8213],"tags":[],"class_list":["clearfix","post-568","post","type-post","status-publish","format-standard","hentry","category-code-snippets"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Disable automatic gallery cover update for MediaPress &#8226; MediaPress | BuddyDev<\/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:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Disable automatic gallery cover update for MediaPress &#8226; MediaPress | BuddyDev\" \/>\n<meta property=\"og:description\" content=\"Do you want to disable the automatic setting of cover by the MediaPress. If you diable it, MediaPress will not set the firt image as the cover of image galleries. You can use the following code. add_filter(&#039;mpp_gallery_auto_update_cover&#039;, &#039;__return_false&#039; ); Interested in looking at the actual code? Please see here.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/\" \/>\n<meta property=\"og:site_name\" content=\"MediaPress | BuddyDev\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/bpdev\" \/>\n<meta property=\"article:published_time\" content=\"2016-09-19T17:10:02+00:00\" \/>\n<meta name=\"author\" content=\"Brajesh Singh\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@sbrajesh\" \/>\n<meta name=\"twitter:site\" content=\"@buddydev\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Brajesh Singh\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/\",\"url\":\"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/\",\"name\":\"Disable automatic gallery cover update for MediaPress &#8226; MediaPress | BuddyDev\",\"isPartOf\":{\"@id\":\"https:\/\/buddydev.com\/mediapress\/#website\"},\"datePublished\":\"2016-09-19T17:10:02+00:00\",\"author\":{\"@id\":\"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\"},\"breadcrumb\":{\"@id\":\"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/buddydev.com\/mediapress\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Disable automatic gallery cover update for MediaPress\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/#website\",\"url\":\"https:\/\/buddydev.com\/mediapress\/\",\"name\":\"MediaPress | BuddyDev\",\"description\":\"The Best Media Gallery Plugin For BuddyPress\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/buddydev.com\/mediapress\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb\",\"name\":\"Brajesh Singh\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/image\/\",\"url\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"contentUrl\":\"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon\",\"caption\":\"Brajesh Singh\"},\"sameAs\":[\"http:\/\/buddydev.com\/members\/sbrajesh\/\",\"https:\/\/x.com\/sbrajesh\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Disable automatic gallery cover update for MediaPress &#8226; MediaPress | BuddyDev","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:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/","og_locale":"en_US","og_type":"article","og_title":"Disable automatic gallery cover update for MediaPress &#8226; MediaPress | BuddyDev","og_description":"Do you want to disable the automatic setting of cover by the MediaPress. If you diable it, MediaPress will not set the firt image as the cover of image galleries. You can use the following code. add_filter('mpp_gallery_auto_update_cover', '__return_false' ); Interested in looking at the actual code? Please see here.","og_url":"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/","og_site_name":"MediaPress | BuddyDev","article_publisher":"https:\/\/www.facebook.com\/bpdev","article_published_time":"2016-09-19T17:10:02+00:00","author":"Brajesh Singh","twitter_card":"summary_large_image","twitter_creator":"@sbrajesh","twitter_site":"@buddydev","twitter_misc":{"Written by":"Brajesh Singh"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/","url":"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/","name":"Disable automatic gallery cover update for MediaPress &#8226; MediaPress | BuddyDev","isPartOf":{"@id":"https:\/\/buddydev.com\/mediapress\/#website"},"datePublished":"2016-09-19T17:10:02+00:00","author":{"@id":"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb"},"breadcrumb":{"@id":"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/buddydev.com\/mediapress\/code-snippets\/disable-automatic-gallery-cover-update-for-mediapress\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/buddydev.com\/mediapress\/"},{"@type":"ListItem","position":2,"name":"Disable automatic gallery cover update for MediaPress"}]},{"@type":"WebSite","@id":"https:\/\/buddydev.com\/mediapress\/#website","url":"https:\/\/buddydev.com\/mediapress\/","name":"MediaPress | BuddyDev","description":"The Best Media Gallery Plugin For BuddyPress","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/buddydev.com\/mediapress\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/4ebf5f3e519f8cbddc6583e182dbe4fb","name":"Brajesh Singh","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/buddydev.com\/mediapress\/#\/schema\/person\/image\/","url":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","contentUrl":"\/\/www.gravatar.com\/avatar\/2106622ee90d53d15ac1402806616aca?s=96&#038;r=g&#038;d=identicon","caption":"Brajesh Singh"},"sameAs":["http:\/\/buddydev.com\/members\/sbrajesh\/","https:\/\/x.com\/sbrajesh"]}]}},"_links":{"self":[{"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/posts\/568","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/comments?post=568"}],"version-history":[{"count":1,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/posts\/568\/revisions"}],"predecessor-version":[{"id":569,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/posts\/568\/revisions\/569"}],"wp:attachment":[{"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/media?parent=568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/categories?post=568"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buddydev.com\/mediapress\/wp-json\/wp\/v2\/tags?post=568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}