Recently changed domain name. Home page widgets are now not in the customize menu yet still being on the page

I recently changed the domain name on my wordpress website. Since doing so I am unable to edit the current widgets I have on the home page. They are still on the actual home page however when I go into customization I see the following “Your theme has 8 widget areas, but this particular page doesn’t display them on page with widgets”.

I can still edit them in the widgets area but I am concerned why I cant do it the normal way in customization. Does anyone have any ideas on how to fix this?

Any help will be much appreciated.

How to customize the “Add to Cart” button of a product?

I created a custom module with Drupal 8 and Commerce 2.11 to modify the “Add to Cart” button of the product sheets.

The module works, but it is currently applied to all products.

I want to apply it only to the product with ID 50

How to customize the “Add to Cart” button of a product ?

<?php  use Drupal\commerce_store\Entity\StoreType; use Drupal\commerce_product\Entity\ProductType; use Drupal\commerce_product\Entity\ProductVariationType; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Url;  function mymodule_form_commerce_order_item_add_to_cart_form_alter(&$  form, \Drupal\Core\Form\FormStateInterface $  form_state, $  form_id) {   $  current_store = \Drupal::service('commerce_store.current_store');   $  owner = $  current_store->getStore()->getOwner();   foreach ($  form_state->getFormObject()->getEntity()->getPurchasedEntity()->getProduct()->getStores() as $  store) {     $  bundle = $  store->bundle();     // Product type abonnement.     if ($  bundle == 'online') {       if (isset($  form["#attributes"]["class"]) && in_array("commerce-order-item-add-to-cart-form", $  form["#attributes"]["class"])) {         $  selectedVariationId = $  form_state->get('selected_variation');         $  selectedVariation = \Drupal\commerce_product\Entity\ProductVariation::load($  selectedVariationId);         $  form['actions']['submit']['#value'] = t('Subscribe');         if (!$  owner->hasRole('marchand')) {           $  form['actions']['submit']['#attributes']['class'] = array('button--add-to-cart', 'button button--primary', 'js-form-submit', 'form-submit', 'is-disabled', 'btn-warning', 'btn');           $  form['actions']['submit']['#disabled'] = TRUE;         }       }     }   } } 

I added commerce-order-item-add-to-cart-form-commerce-product-50 to my code but it does not work :

<?php  use Drupal\commerce_store\Entity\StoreType; use Drupal\commerce_product\Entity\ProductType; use Drupal\commerce_product\Entity\ProductVariationType; use Drupal\Core\Entity\Display\EntityViewDisplayInterface; use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Url;  function mymodule_form_commerce_order_item_add_to_cart_form_alter(&$  form, \Drupal\Core\Form\FormStateInterface $  form_state, $  form_id) {   $  current_store = \Drupal::service('commerce_store.current_store');   $  owner = $  current_store->getStore()->getOwner();   foreach ($  form_state->getFormObject()->getEntity()->getPurchasedEntity()->getProduct()->getStores() as $  store) {     $  bundle = $  store->bundle();     // Product type abonnement.     if ($  bundle == 'online') {       if (isset($  form["#attributes"]["class"]) && in_array("commerce-order-item-add-to-cart-form-commerce-product-50", $  form["#attributes"]["class"])) {         $  selectedVariationId = $  form_state->get('selected_variation');         $  selectedVariation = \Drupal\commerce_product\Entity\ProductVariation::load($  selectedVariationId);         $  form['actions']['submit']['#value'] = t('Subscribe');         if (!$  owner->hasRole('marchand')) {           $  form['actions']['submit']['#attributes']['class'] = array('button--add-to-cart', 'button button--primary', 'js-form-submit', 'form-submit', 'is-disabled', 'btn-warning', 'btn');           $  form['actions']['submit']['#disabled'] = TRUE;         }       }     }   } } 

enter image description here

Make your Responsive wordpress website fix , customize for $250

Are you stuck with WordPress problems you can’t figure out how to fix? Looking for custom WP development? Need to migrate your WP site?Need to customize your theme ? I’m a freelance Web developer and i have 5 years of experience in PHP and WP! CMS. i will help you to do what you want with your WP website: ►Theme customization ►CSS ►Theme installation ►Site Design and Layout ►Any WordPress Plugin setup/configuration ►Any PHP error ►Woocommerce customization ►Widget Area ►Custom style for anything ►Background, Header, Footer ►Remove unnecessary meta-data ►Change the Permalink Structure ►Disable HTML in WP comments ►Turn off Post Revisions in WordPress ►Hide Errors on the WP Login screen ►Favicon & Logo customization ►Improve the Security of your WordPress website ►wordpress SEO ►wordpress website speed and Performance Optimization ►Any type of common WordPress Errors ►Much More … NOTE: **Please send me a message before you make an order. Its very important ! We should discuss first about what you need. I always do a quick reply.

by: Robatsoon
Created: —
Category: WordPress
Viewed: 189


How to customize a section of a widget only on certain pages or page

I am using the twentynineteen default WordPress theme but I would like to know how I can remove this line <?php get_template_part( 'template-parts/footer/footer', 'widgets' ); ?> only on certain pages in footer.php. Similar to this post: How to add a specific widget to only 1 page?. Basically, I would like to know how I can change a sections of a widget in a child theme on certain pages.

I Fix Bugs, Error And Customize Your Shopify Store for $10

I can fix shopify store bugs, issues by completing your project on time and I will work for you until you get 100% satisfaction. I also provide new store full setup with a stunning looks just cheap price. And Here is the list of more services that I provide: √ Shopify Custom Theme Development√ Shopify Theme Customization√ Shopify Theme Development√ Shopify Bug Fixing√ Shopify Error and Issues Fixing√ PSD to Shopify √ Responsive theme Development Shopify Please Note: If you have more than 1 task or a big project, you can contact me in my inbox to discuss it and get a custom quote. The price may vary according to your requirement. Please contact me before ordering.

by: ShopifyDev
Created: —
Category: Programming
Viewed: 186


Customize “view modes” and “form modes” based on role

Drupal 8 has extended the View Modes concept to Form modes

  1. Is it possible to assign a role to both “View Modes” and “Form Modes”?
  2. How does one assign a mode both view mode or form mode to be shown at a particular place ? Say I wish to Full content view mode shown at certain page and Teaser view mode show in a block at another location. Similarly I want form mode A show during create and form B during edit.

For example there is a content type with following Fields

  • Title : displayed publicly, editable by author
  • Body : displayed publicly, editable by author
  • Project code : Not displayed publicly, displayed and editable by author
  • System code : only visible/editable by admin

Essentially this could be an interesting and performant way to implement field permissions. The field permissions module has no port for Drupal 8 yet.