I want to use this plugin to make the custom CSS page in my website of laptop reviews. Can you help me regarding this?
]]>This plugin prevents the WordPress Screen Options and Help boxes (top of Edit Page / Edit Post screens) from expanding and collapsing. The issue is a CSS class name conflict between WordPress and the plugin’s bootstrap.css. The class name in question is “hidden”.
Given that the plugin never uses the class, my recommendation is to either remove it from bootstrap.css or at least remove “!important” from display: none.
]]>Here is the fix I’ve been using to get custom page/post JS to load. In spcc_class.php, add the following to the end of the constructor, line 20:
add_action('wp_footer', array($this, 'spcc_single_custom_js'));
Then add the following function to the end of the file, right below spcc_single_custom_css:
public function spcc_single_custom_js() {
if (is_single() || is_page()) {
global $post;
$single_custom_js = get_post_meta($post->ID, '_single_add_custom_js', true);
if ($single_custom_js !== '') {
$output = "<script>\n" . $single_custom_js . "\n</script>\n";
echo $output;
}
}
}
It’s basically a mirror of the code that loads the CSS, only it outputs the JS instead. Works great for me.
Thank you for creating this super useful plugin!
]]>Hello!
I’m still new to editing/coding my site.
I want to add code that is working on all my pages/posts.
E.g., link colours and hovers etc., links without underlines.
And I want to add code to just a single page or post.
Which sections of the plugin do I have to use for achieving what?
Thanks for answering.
]]>There is some code in the bootstrap.css
file which causes problems:
.hidden {
display: none !important;
}
See here:
https://lakeshorewoods.rocks/screenshots/2017-11-02_17-14-01.png
This code is being applied to the WP admin, preventing the normal behavior of the “Screen Options” and “Help” slide downs at the top-right of the dashboard.
Can the !important
be removed so the WP UI can operate normally?
Hi! I am trying to use this code in a page:
(function($) {
var $animation_elements = $(‘.et-waypoint’),
$window = $(window);
function check_if_in_view() {
var window_height = $window.height(),
window_top_position = $window.scrollTop(),
window_bottom_position = (window_top_position + window_height);
$animation_elements.each(function() {
var $element = $(this),
element_height = $element.outerHeight(),
element_top_position = $element.offset().top,
element_bottom_position = (element_top_position + element_height);
//check to see if this element is within viewport
if ((element_bottom_position >= window_top_position) && (element_top_position <= window_bottom_position)) {
$element.addClass(‘et-animated’);
} else {
$element.removeClass(‘et-animated’);
}
});
}
$window.on(‘scroll resize’, check_if_in_view);
})(jQuery);
But it does not load the js. Your plugin is awesome, just need to see what I am doing wrong with the js. Tried to paste it inside setting too but it won′t work.
Thanks!
]]>Hi! Is it possible to set the js or css to load on header or footer? Some code snippets only work on the header, but it is a better practice to load the major of the code on footer.
Thanks!
]]>Awesome plugin. But could you implement the feature to add custom JS to each post/page? If it could do that I’d definitely start using it and recommend it to my clients.
]]>