Categories
CMS Development React Wordpress

Is there an obvious error in this React code for customizing a Gutenberg Block?

I am trying to add a select field and a title field to a certain block. I used this example as starting point: https://www.liip.ch/en/blog/how-to-extend-existing-gutenberg-blocks-in-wordpress My code is const { assign } = lodash; const { addFilter } = wp.hooks; const { __ } = wp.i18n; // Enable content type on the following blocks const enableBlockContentTypeAttribute […]

Categories
CMS CSS Development Wordpress

Is there a preset CSS class when shopping cart isn’t empty?

WooCommerce enables automatically .logged-in class when a user is logged in. This allows to create a page with different content without any PHP coding. Is there something similar when the shopping cart is empty? I am NOT seeking any PHP solution. It should be solved only with a CSS class so I can hide/show parts […]

Categories
CMS Development Google Wordpress

how to show google sign in popup on the right side in wordpress

Please help me how to show google sign in popup on right side in wordpress like screen shots

Categories
CMS Development Wordpress

From a page, is it possible to find entry’s “menu_item_parent”?

The idea would be to be able to retrieve a sub-menu matching a given page to display it as an aside on page. As an exemple, let’s consider this menu: Home Outdoor MTB Rock climbing Running Hiking Indoor … About US Blog So if I’m on the Hiking page I’d want to retrieve Outdoor and […]

Categories
CMS Development Wordpress

Overriding Plugin function in your child theme

Plugin actions $this->loader->add_action( ‘wp_ajax_woo_amc_get_cart’, $plugin_public, ‘show_cart_items_html’ ); $this->loader->add_action( ‘wp_ajax_nopriv_woo_amc_get_cart’, $plugin_public, ‘show_cart_items_html’ ); Plugin function public function show_cart_items_html(){ $type = sanitize_text_field($_POST[‘type’]); $cart = array( ‘html’ => 0, ‘count’ => 0, ‘total’ => 0, ); if ($type) { $items = WC()->cart->get_cart(); if ($type == ‘center’) { $template_type_items = ‘items_center’; } else { $template_type_items = ‘items_side’; } ob_start(); […]

Categories
CMS Development Wordpress

How can I hover one element to affect another?

I have this three columns as you can see on the picture, and this is the website URL – http://david-portfolio-com.stackstaging.com/. When one column is hovered I would like the others two, to have less opacity. Would this be possible only using CSS ? I am using the divi theme. Thanks in Advance Davíð

Categories
CMS Development Wordpress

WooCommerce Add Fee Not Working in Plugin

I am adding a fee like so to the woocommerce cart : function promo () { global $woocommerce; $woocommerce->cart->add_fee( __(‘des’, ‘woocommerce’), 50.00, true, ”); } add_action (‘woocommerce_cart_calculate_fees’, ‘promo’); This works fine in functions.php of my theme, but does not work in a file of my plugin.

Categories
CMS Development Wordpress

Pros and cons of actions over shortcodes

i need to output some posts on some pages and i created shortcode: function show_foo() { // output stuff } add_shortcode( ‘foo’, ‘show_foo’ ); and I use it like this in templates: echo do_shortcode(‘[foo]’); But now I’m thinking if I shouldn’t use action in favor of shortcode, like this: function show_foo() { // output stuff […]

Categories
CMS Development Wordpress

Dynamically loaded Theme components based on Customizer Settings values : changes not appearing in Customizer preview – (Workaround found)

I’m trying to create a WP theme (for personal learning purposes, still pretty new to wp) where Header/Container/Footer are each chosen based on a dedicated customizer setting (still plain text, possible choices will be based on a pre-defined list probably). The idea: A Theme singleton(i know… that’s not an happy choice) handles class instances which […]

Categories
CMS Development Website Wordpress

WordPress website Thumbnails not showing on Facebook Share

When i am sharing my articles, it isn’t showing featured image as a thumbnail. After using Facebook debugger, it is showing me this; I also tried changing wordpress plugin settings as well as changed the featured image size, but still unable to fix it.