Category: Blog

Best e-commerce development company. Best app development company.Best designing company.
  • How to render taxonomy in page template in Drupal 7

    How to render taxonomy in page template in Drupal 7

    Display taxonomy terms in a page template in Drupal using multiple methods. The easiest way to solve an issue is to let it deal with by experts. We can provide a wide range of web services. Get in touch with us to know more. $vocabulary= taxonomy_vocabulary_machine_name_load(‘vocobulary_name’); if ($terms = taxonomy_get_tree($vocabulary->vid)) { foreach ($terms as $term) { $term_name =…

  • Add fields to WordPress user profile

    Add fields to WordPress user profile

    The following snippet will add fields to the WordPress user profile in your profile section. In this code, we provide two fields, Sales Partner and Address. You can add any number of fields. These fields are saved in a user profile. So need to create an extra table to store this data in WordPress. function…

  • How Contact Form submitted data into a table in WordPress(WPCF7)

    How Contact Form submitted data into a table in WordPress(WPCF7)

    The code below demonstrates how to insert data from a Contact Form 7 submission into a custom table in WordPress. This code should be placed in your theme’s functions.php file. First, ensure you have created a custom table in your WordPress database. Explanation of the Code: Additional Notes: This setup allows you to efficiently capture…

  • Creation and Remove custom form fields using ajax in Drupal 8

    Creation and Remove custom form fields using ajax in Drupal 8

    Below given is the code for the creation and removal of the custom form field using Ajax in Drupal 8. public function buildForm(array $form, FormStateInterface $form_state) { $form[‘#tree’] = true; $form[‘#prefix’] = ‘ ‘; $form[‘#suffix’] = ”; $form[‘#cache’] = [‘max-age’ => 0]; $nb_sponsee = $form_state->get(‘nb_sponsee’); $form[‘sponsees’] = [ ‘#type’ => ‘container’, ‘#prefix’ => ‘ ‘,…

  • Code For PHP File For Saving The Graph As An Image Inside Your Folder

    Code For PHP File For Saving The Graph As An Image Inside Your Folder

    Given below is the PHP code for saving a graph as an image inside the folder. At Sreyas, experienced PHP developers are available for customizing the requirements of clients. This script captures image data from a POST request, processes it, and saves it as a PNG file in a specified directory. php $img_data = $_POST[‘data’];…

  • Stripe Integration In Drupal 8

    Stripe Integration In Drupal 8

    Stripe is a commonly used payment gateway. Stripe integration in Drupal 8 requires a stripe library. We can install the stripe library using Composer. Use the following command to install the stripe library using which Stripe integration in Drupal 8 is possible. public function buildForm(array $form, FormStateInterface $form_state) { $stripe=array(“secret_key”=> “********************”, //Give your api keys…

  • Programmatically login a user in Drupal 7

    Programmatically login a user in Drupal 7

    There are scenarios where you may need to programmatically log in a user in your Drupal site, such as during a custom registration process, single sign-on implementations, or for testing purposes. Below is the to programmatically log a user in Drupal 7. //Auto login new user $account = user_load($uid);// $uid is the user id $user_account…

  • C tools Modal Popup and Theming in Drupal 7

    C tools Modal Popup and Theming in Drupal 7

    Using the power of the Ctools Modal Popup and Theming in Drupal 7 we can create our own custom popups. Theming of popups can be done with the help of a js file, which we can alter accordingly. Here is an example of how to use Ctools to create a popup up to Update Profile…

  • BOOST YOUR BUSINESS THROUGH SOCIAL MEDIA!!!!

    BOOST YOUR BUSINESS THROUGH SOCIAL MEDIA!!!!

    Some fast tips on a way to create the foremost of your Social Media Optimization(SMO)efforts. 1. Integrate Social icons into your website Social sharing icons ought to be integrated into your website design. embrace direct web links to your social media channels from your website and from your social profiles back to your website, you’ll be…

  • WordPress Website Performance Optimization

    WordPress Website Performance Optimization

    These days almost every business person has a website, there are many ways to make the websites attractive, content-rich, and responsive so that websites can be seen on different devices without any problem. There are many perfectly structured templates that anyone can make use of to get an attractive website. But after all their changes…

  • How to add external/internal files to the Drupal 8 theme

    How to add external/internal files to the Drupal 8 theme

    This page explains how to add an external/internal style sheet or javascript file into the Drupal 8 theme. Use the below code in THEME_NAME.libraries.yml global-styling: css: theme: css/style.css: {} ‘https://fonts.googleapis.com/css?family=Fira+Sans:300,400,500,700’: { type: external } # lib: # lib/mulihu-scrollbar/jquery.mCustomScrollbar.css: {} version: VERSION js: js/owl.carousel.min.js: {} # lib/mulihu-scrollbar/jquery.mCustomScrollbar.concat.min.js: {} dependencies: – core/jquery – core/drupal

  • How to render block in Drupal 8 theme template.

    How to render block in Drupal 8 theme template.

    Drupal is content management software and websites and applications developed using Drupal have easy content authoring, reliable performance, and excellent security. To render block in a Drupal 8 theme template, allows a theme to have nearly complete control over the appearance of the site, which includes both the markup and the CSS used to style…