theme customizer – can a single option pass multiple values?

I understand what you are trying to do, but you are going in the wrong direction here, you can just check if one was selected in your logic and assign the value there like this: function css_customizer(){ $blog_setting_val = get_theme_mod(‘blog_setting’); $opacity_val = ($blog_setting_val == ‘block’) ? ‘1’ : ‘0’; ?> <style type=”text/css”> .blog__Link{display: <?php echo … Read more

Hide Customizer’s Widget Choices From The List

The only way to disable a Widget from appearing in this list is to unregister it. You can do that just in the customizer: function unregister_customizer_widgets() { if ( is_customize_preview() ){ unregister_widget(‘WP_Widget_Recent_Posts’); } } add_action( ‘widgets_init’, ‘unregister_customizer_widgets’ ); But that will remove it from the page preview and the sidebars. Even if it is used … Read more

Hiding Short Description in Shop Page, WooCommerce

Try using one of the available shop loop item actions and remove call to WooCommerce template function woocommerce_template_single_excerpt using remove_action(). woocommerce_before_shop_loop_item (before thumbnail) woocommerce_before_shop_loop_item_title (before title) woocommerce_shop_loop_item_title (before price) woocommerce_after_shop_loop_item_title (before “Add to cart” button) woocommerce_after_shop_loop_item (after “Add to cart” button) These actions are called in woocommerce/templates/content-product.php. E. g. remove_action( ‘woocommerce_shop_loop_item_title’, ‘woocommerce_template_single_excerpt’ );. Make sure … Read more

External Link Button Under Post Excerpt on Index.php

The Codilight theme is bypassing the usual the_excerpt with their own version: inc/extras.php +26: if ( ! function_exists( ‘codilight_lite_excerpt’ ) ) : /** * Get the except content limit by characters. * * @param string $characters * @return string */ function codilight_lite_excerpt( $characters ){ // $characters = 160; $excerpt = get_the_content(); $excerpt = preg_replace(” (\[.*?\])”,”,$excerpt); … Read more

Adding tags when creating new post

Sounds like it’s expecting tag IDs as integers and you’re sending strings. split returns an array of strings, even if those strings are numbers. Instead of using .split try something like this let tags = JSON.parse(“[” + this.newPostTags + “]”); If you really like split then you would do this: let tags = this.newPostTags.split(“,”).map(Number);

How to Restore Deleted Post Not in Trash

If your post isn’t in Trash, then it was completely deleted. The only way to restore it is recovering your database from an earlier backup. If you don’t have backups and your post was deleted from the database – there is no way to restore it.