bbopbernard
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Clicking on WordPress calendar/archive widget breaks layoutI’ve dug a little deeper. Is there a way to remove a single class from body_class()?
EDIT: Figured it out. Add the following to your functions.php.
function remove_a_body_class($wp_classes) { foreach($wp_classes as $key => $value) { if ($value == 'date') { unset($wp_classes[$key]); } } return $wp_classes; } add_filter('body_class', 'remove_a_body_class', 20, 2);
Forum: Themes and Templates
In reply to: Archives Page not centeredI’ve dug a little deeper. Is there a way to remove a single class from body_class()?
EDIT: Figured it out. Add the following to your functions.php.
function remove_a_body_class($wp_classes) { foreach($wp_classes as $key => $value) { if ($value == 'date') { unset($wp_classes[$key]); } } return $wp_classes; } add_filter('body_class', 'remove_a_body_class', 20, 2);
Forum: Themes and Templates
In reply to: Archives Page not centeredStill haven’t found a solution, any ideas?
Forum: Fixing WordPress
In reply to: Clicking on WordPress calendar/archive widget breaks layoutStill haven’t found a solution, any ideas?
Forum: Themes and Templates
In reply to: Archives Page not centeredI am also having this issue. Is there a way to have archive.php centered without having to remove body_class()?
Forum: Fixing WordPress
In reply to: Clicking on WordPress calendar/archive widget breaks layoutI have found the problem here. I had to remove the body_class() from the header.php. However, theme check requires me to have body_class(). Is there a workaround to have both the page centered and the body_class()?
Thanks.
Forum: Plugins
In reply to: [Easy Image Gallery] Metabox VisibilityThe javascript is currently in my header.
Would I need to change my approach and look towards this:
https://codex.www.ads-software.com/Function_Reference/wp_enqueue_script
Forum: Plugins
In reply to: [Easy Image Gallery] Metabox VisibilityThe metabox is not getting a hidden css class. I tried using the code snippet above in the developer tools console in chrome and it works, but anywhere else, it has no effect.
Forum: Plugins
In reply to: [Easy Image Gallery] Metabox VisibilityI can’t seem to get that code you provided in the link working. I currently have this:
<script> $( document ).ready( function($) { $( "#easy_image_gallery" ).addClass( "hidden" ); if( $( "input#post-format-gallery" ).is(':checked') ){ $( "#easy_image_gallery" ).removeClass( "hidden" ); } $( "input#post-format-gallery" ).change( function() { if( $(this).is(':checked') ){ $( "#easy_image_gallery" ).removeClass( "hidden" ); } } ); } ); </script>
I have opened your code and found the id of your metabox to be ‘easy_image_gallery’, but I’m not entirely sure if that value is supposed to go where is currently is. Any help would be appreciated.
Forum: Plugins
In reply to: [Easy Image Gallery] Metabox VisibilityThanks, appreciate it.
Forum: Plugins
In reply to: [Easy Image Gallery] Metabox VisibilityJavascript is probably one of my weaker points right now. Are you able to provide a snippet of what it would look like?
Thanks
Forum: Plugins
In reply to: [Easy Image Gallery] Metabox VisibilityYea, I do. I changed my original post to another question that I had
Forum: Plugins
In reply to: [Easy Image Gallery] Metabox Visibility