Error in “class-wp-hook.php”

I managed to fix the issue, by checking and removing the missing function from the plugin file, as the error mentions “function ‘wp_schedule_https_detection’ not found or invalid function name” Probably you are calling the function ‘wp_schedule_https_detection’ in your plugin file, and its missing the function in the plugin file. The file ‘class-wp-hook.php’ should not be … Read more

What is wp_get_post_tags for media tags?

If I understand correctly, wp_get_post_tags returns the “post_tags” taxonomy terms. Yes, except that the taxonomy is post_tag and not post_tags. How can I access “attachment_keywords” taxonomy terms? wp_get_post_tags() uses wp_get_post_terms(), so you would do the same for custom taxonomies. For example if the taxonomy (name/slug) is attachment_keywords, then: $tags = wp_get_post_terms( $post->ID, ‘attachment_keywords’ ); And … Read more

Changing the HTML of notices in WooCommerce [closed]

After talking with some of the WooCommerce people on Slack, I realized that the problem here is probably this pattern, in frontend/cart.js – due to the fact, that my store uses the AJAX functionality that WooCommerce provides. var show_notice = function( html_element, $target ) { if ( ! $target ) { $target = $( ‘.woocommerce-notices-wrapper:first’ … Read more

Pagination not working – FrontPage

I use this on archive pages. If you are trying to use it elsewhere then that might be a cause of the issue. if ( ! function_exists( ‘_s_pagination_links’ ) ) : /** * Numbered pagination */ function _s_pagination_links() { global $wp_query; $total_pages = $wp_query->max_num_pages; if ($total_pages > 1){ $current_page = max(1, get_query_var(‘paged’)); echo paginate_links(array( ‘base’ … Read more