Dorcode - RSS https://www.dorcode.com/rss/user/vikas How to check if customer is logged in or not in magento https://www.dorcode.com/questions/165/how-to-check-if-customer-is-logged-in-or-not-in-magento Customer session does not work except some pages Sun, 09 Sep 2018 09:42:37 +0530 https://www.dorcode.com/questions/165/how-to-check-if-customer-is-logged-in-or-not-in-magento How to limit characters for textarea including count in jquery https://www.dorcode.com/questions/164/how-to-limit-characters-for-textarea-including-count-in-jquery Here are two scenarios where the keyup event will not get fired: The user drags text into the textarea. The user copy-paste text in the textarea with a right click (contextual menu). Wed, 08 Aug 2018 11:31:13 +0530 https://www.dorcode.com/questions/164/how-to-limit-characters-for-textarea-including-count-in-jquery How to check if customer is logged in or not in magento 2? https://www.dorcode.com/questions/163/how-to-check-if-customer-is-logged-in-or-not-in-magento-2 Customer session does not work except some pages Thu, 26 Jul 2018 16:33:14 +0530 https://www.dorcode.com/questions/163/how-to-check-if-customer-is-logged-in-or-not-in-magento-2 How to Hide the WordPress Update Notification in dashboard https://www.dorcode.com/questions/162/how-to-hide-the-wordpress-update-notification-in-dashboard To disable this update notification, there is no switch in the settings menu or anywhere else in the admin dashboard. To prevent WordPress from showing these information snippets on top of your WordPress dashboard, you shall need to add a PHP code snippet to your functions.php file. Tue, 29 May 2018 12:30:58 +0530 https://www.dorcode.com/questions/162/how-to-hide-the-wordpress-update-notification-in-dashboard How to create add to cart with AJAX on single and variable products programmatically https://www.dorcode.com/questions/161/how-to-create-add-to-cart-with-ajax-on-single-and-variable-products-programmatically default WooCommerce if the user clicks on the add to cart button, that item is added to the cart. if you want to add custom add to cart button please remove default "add to cart" button Tue, 29 May 2018 12:20:26 +0530 https://www.dorcode.com/questions/161/how-to-create-add-to-cart-with-ajax-on-single-and-variable-products-programmatically How to enable developer mode or enable all error messages in magento 2 https://www.dorcode.com/questions/157/how-to-enable-developer-mode-or-enable-all-error-messages-in-magento-2 When you’re getting a blank page in Magento 2.x or only error number like Error log record number: (any number), you can enable error reporting in Magento. Wed, 04 Apr 2018 16:44:01 +0530 https://www.dorcode.com/questions/157/how-to-enable-developer-mode-or-enable-all-error-messages-in-magento-2 How will my javascript function executed after the previous ajax call complete ? https://www.dorcode.com/questions/154/how-will-my-javascript-function-executed-after-the-previous-ajax-call-complete You can specify a function identifier in a custom property in your .ajax() call and use the value of that in your ajaxComplete() callback. Thu, 15 Mar 2018 13:48:26 +0530 https://www.dorcode.com/questions/154/how-will-my-javascript-function-executed-after-the-previous-ajax-call-complete How to Remove Items from the WordPress Toolbar new from wp admin area https://www.dorcode.com/questions/153/how-to-remove-items-from-the-wordpress-toolbar-new-from-wp-admin-area According to me if you want to remove all NEW link in wp admin area please follow this code Tue, 13 Mar 2018 17:31:01 +0530 https://www.dorcode.com/questions/153/how-to-remove-items-from-the-wordpress-toolbar-new-from-wp-admin-area woocommerce backend add items in new or edit orders https://www.dorcode.com/questions/152/woocommerce-backend-add-items-in-new-or-edit-orders If you need to change item product prices in Woocommerce Backend Order. Please use the following hook or code Thu, 08 Mar 2018 12:54:22 +0530 https://www.dorcode.com/questions/152/woocommerce-backend-add-items-in-new-or-edit-orders How to change user role after wordpress registration https://www.dorcode.com/questions/151/how-to-change-user-role-after-wordpress-registration This action hook allows you to access data for a new user immediately after they are added to the database. The user id is passed to hook as an argument. Thu, 22 Feb 2018 15:13:33 +0530 https://www.dorcode.com/questions/151/how-to-change-user-role-after-wordpress-registration how to add custom menu code in wordpress templates https://www.dorcode.com/questions/150/how-to-add-custom-menu-code-in-wordpress-templates If you want to add custom navigation menus in your WordPress templates? By default, many WordPress themes come with pre-defined menu locations and layouts. follow this article: Tue, 20 Feb 2018 15:58:20 +0530 https://www.dorcode.com/questions/150/how-to-add-custom-menu-code-in-wordpress-templates how to add a custom fields to wordpress pages and custom post type https://www.dorcode.com/questions/149/how-to-add-a-custom-fields-to-wordpress-pages-and-custom-post-type The hook allows meta box registration for any post type. Passes two parameters: $post_type and $post. Note: You can also use add_meta_boxes_{post_type} for best practice, so your hook will only run when editing a specific post type. This will only receive 1 parameter - $post. Tue, 20 Feb 2018 15:46:43 +0530 https://www.dorcode.com/questions/149/how-to-add-a-custom-fields-to-wordpress-pages-and-custom-post-type How to WooCommerce state field (billing or shipping) not required on checkout page https://www.dorcode.com/questions/146/how-to-woocommerce-state-field-billing-or-shipping-not-required-on-checkout-page Try this code in your functions.php file Thu, 15 Feb 2018 18:05:30 +0530 https://www.dorcode.com/questions/146/how-to-woocommerce-state-field-billing-or-shipping-not-required-on-checkout-page How to Update PHP cookie or Update if not set and get cookie all values using codeigniter https://www.dorcode.com/questions/145/how-to-update-php-cookie-or-update-if-not-set-and-get-cookie-all-values-using-codeigniter A cookie, also known as an HTTP cookie, web cookie, or browser cookie, is a small piece of data sent from a website and stored in a user's web browser while the user is browsing that website. A cookie is a small file that the server embeds on the user's computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values. Thu, 11 Jan 2018 12:12:28 +0530 https://www.dorcode.com/questions/145/how-to-update-php-cookie-or-update-if-not-set-and-get-cookie-all-values-using-codeigniter How to Connect with MySQLi or PDO Server through PHP https://www.dorcode.com/questions/144/how-to-connect-with-mysqli-or-pdo-server-through-php PHP you can easily do this using the mysqli_connect() function. All communication between PHP and the MySQL database server takes place through this connection. The basic syntaxes for connecting to MySQL using MySQLi and PDO extensions: Wed, 10 Jan 2018 16:31:41 +0530 https://www.dorcode.com/questions/144/how-to-connect-with-mysqli-or-pdo-server-through-php Anybody know that how to create HTML to PDF in PHP with phpToPDF https://www.dorcode.com/questions/143/anybody-know-that-how-to-create-html-to-pdf-in-php-with-phptopdf Now generate 'A5' sized PDF from html and display it view. The PDF name will be 'simple_any_name.pdf'. Wed, 10 Jan 2018 16:03:45 +0530 https://www.dorcode.com/questions/143/anybody-know-that-how-to-create-html-to-pdf-in-php-with-phptopdf HTML5 Form Validation With the pattern (Regex) Attribute in html https://www.dorcode.com/questions/141/html5-form-validation-with-the-pattern-regex-attribute-in-html This is another Client Side Validation strategy No JavaScript or jQuery required, Thanks to HTML5 in light of the fact that approvals should now be possible utilizing HTML5 without coding of javascript or any server side dialect, utilizing HTML5 you can approve frames with design, Forms must be approve either utilizing customer side or server side since it causes you to gather redress information or substantial shape esteems from the clients, you can't trust clients aimlessly, how about we see it. Tue, 19 Dec 2017 16:58:46 +0530 https://www.dorcode.com/questions/141/html5-form-validation-with-the-pattern-regex-attribute-in-html Wordpress administrator page not showing up template name in template dropdown https://www.dorcode.com/questions/140/wordpress-administrator-page-not-showing-up-template-name-in-template-dropdown There's a bug in Wordpress 4.9, I discovered this temporary super code. I plan on uninstalling it once they fix the bug, but it works great in the meantime! Wed, 22 Nov 2017 18:52:46 +0530 https://www.dorcode.com/questions/140/wordpress-administrator-page-not-showing-up-template-name-in-template-dropdown Dynamically loading an external JavaScript or CSS file using function https://www.dorcode.com/questions/138/dynamically-loading-an-external-javascript-or-css-file-using-function To load a .js or .css file dynamically, in a head section, it means using DOM methods to first create a new "SCRIPT" or "LINK" element, assign it the appropriate attributes, and finally, use element.appendChild() to add the element to the desired location within the document tree. It sounds a lot more fancy than it really is. Lets see how it all comes together Mon, 06 Nov 2017 14:46:35 +0530 https://www.dorcode.com/questions/138/dynamically-loading-an-external-javascript-or-css-file-using-function How do I separate all YouTube video ids and links in a string using a regex https://www.dorcode.com/questions/137/how-do-i-separate-all-youtube-video-ids-and-links-in-a-string-using-a-regex YouTube video Link may be encountered in a variety of formats: Fri, 06 Oct 2017 18:30:14 +0530 https://www.dorcode.com/questions/137/how-do-i-separate-all-youtube-video-ids-and-links-in-a-string-using-a-regex how to force refresh after login in wordpress https://www.dorcode.com/questions/136/how-to-force-refresh-after-login-in-wordpress After wordpress login redirect page but not refresh so please try to add these lines in the top of the your wordpress theme file like header.php or wp-config.php Wed, 04 Oct 2017 17:05:56 +0530 https://www.dorcode.com/questions/136/how-to-force-refresh-after-login-in-wordpress How to add, change and delete subscribers to a list using Mailchimp's rest API v3 with Php https://www.dorcode.com/questions/132/how-to-add-change-and-delete-subscribers-to-a-list-using-mailchimps-rest-api-v3-with-php MailChimp REST Api V3 exposes methods that allows you to add, change subscribed to unsubscribed, delete list member and get all member list of a specific MailChimp list. Thu, 17 Aug 2017 16:20:37 +0530 https://www.dorcode.com/questions/132/how-to-add-change-and-delete-subscribers-to-a-list-using-mailchimps-rest-api-v3-with-php How to Add Pagination in Your WordPress Theme or Core Php https://www.dorcode.com/questions/131/how-to-add-pagination-in-your-wordpress-theme-or-core-php WordPress offers built-in functionality for navigating through posts. Theme developers can use simple default wordpress pagination function or other pagination function for better customize. Fri, 11 Aug 2017 10:05:09 +0530 https://www.dorcode.com/questions/131/how-to-add-pagination-in-your-wordpress-theme-or-core-php how to use ajax in wordpress page https://www.dorcode.com/questions/130/how-to-use-ajax-in-wordpress-page This article, aimed at plugin developers, describes how to add Ajax to a plugin or page. Before reading this article, you should be familiar with the following Thu, 10 Aug 2017 11:59:35 +0530 https://www.dorcode.com/questions/130/how-to-use-ajax-in-wordpress-page Wordpress not working get_template_directory_uri with a child theme https://www.dorcode.com/questions/125/wordpress-not-working-get_template_directory_uri-with-a-child-theme How to get WordPress Child Theme Path. Tue, 11 Apr 2017 06:40:45 +0530 https://www.dorcode.com/questions/125/wordpress-not-working-get_template_directory_uri-with-a-child-theme How to get all wordpress categories sort by top post categories first https://www.dorcode.com/questions/117/how-to-get-all-wordpress-categories-sort-by-top-post-categories-first I have below code here. It's display that I want categories names with all details as well. This code to display top post categories first show. Wed, 08 Feb 2017 17:27:03 +0530 https://www.dorcode.com/questions/117/how-to-get-all-wordpress-categories-sort-by-top-post-categories-first Get content between two strings, tag and brackets using php https://www.dorcode.com/questions/111/get-content-between-two-strings-tag-and-brackets-using-php If the strings are different [iframe] and [/iframe], take a look at this. copy his code below: Mon, 09 Jan 2017 22:11:53 +0530 https://www.dorcode.com/questions/111/get-content-between-two-strings-tag-and-brackets-using-php How do I sorting MySQL result by ages from the birthday date https://www.dorcode.com/questions/108/how-do-i-sorting-mysql-result-by-ages-from-the-birthday-date MySQL sorting by age if your birthday like this 1974-05-15, 1974-05-28 (YEAR,MONTH,DATE) Fri, 09 Dec 2016 22:09:19 +0530 https://www.dorcode.com/questions/108/how-do-i-sorting-mysql-result-by-ages-from-the-birthday-date Warning: Cannot modify header information - headers already sent by ERROR https://www.dorcode.com/questions/102/warning-cannot-modify-header-information-headers-already-sent-by-error fix “Headers already sent” error in PHP Wed, 14 Sep 2016 21:43:20 +0530 https://www.dorcode.com/questions/102/warning-cannot-modify-header-information-headers-already-sent-by-error Generating cryptographically secure tokens in php https://www.dorcode.com/questions/98/generating-cryptographically-secure-tokens-in-php In order to generate token for access to api and other Sat, 30 Jul 2016 18:00:19 +0530 https://www.dorcode.com/questions/98/generating-cryptographically-secure-tokens-in-php How to Manipulating or Modify the Browser History in Complex HTML5 and JavaScript Applications https://www.dorcode.com/questions/95/how-to-manipulating-or-modify-the-browser-history-in-complex-html5-and-javascript-applications URL — The new history entry's URL is given by this parameter. Note that the browser won't attempt to load this URL after a call to pushState(), but it might attempt to load the URL later, for instance after the user restarts the browser. The new URL does not need to be absolute; if it's relative, it's resolved relative to the current URL. The new URL must be of the same origin as the current URL; otherwise, pushState() will throw an exception. This parameter is optional; if it isn't specified, it's set to the document's current URL. Fri, 08 Jul 2016 22:37:36 +0530 https://www.dorcode.com/questions/95/how-to-manipulating-or-modify-the-browser-history-in-complex-html5-and-javascript-applications How to add Magento Canonical Meta Tag https://www.dorcode.com/questions/94/how-to-add-magento-canonical-meta-tag Magento SEO - How to add Magento Canonical Meta Tag Wed, 06 Jul 2016 17:33:41 +0530 https://www.dorcode.com/questions/94/how-to-add-magento-canonical-meta-tag Magento. Adding page links to the navigation bar https://www.dorcode.com/questions/93/magento-adding-page-links-to-the-navigation-bar This tutorial shows how to add page links to Magento navigation bar. In order to add the page links to the navigation bar, you should perform the following steps: Wed, 06 Jul 2016 17:20:32 +0530 https://www.dorcode.com/questions/93/magento-adding-page-links-to-the-navigation-bar How to compress CSS files using PHP https://www.dorcode.com/questions/92/how-to-compress-css-files-using-php When you’re using a sophisticated design, CSS files can quickly become very long, and takes time to load. I have compiled interresting ways of compressing CSS files by using PHP. Fri, 01 Jul 2016 19:38:47 +0530 https://www.dorcode.com/questions/92/how-to-compress-css-files-using-php UI Datepicker be made to disable Saturdays and Sundays with custom date https://www.dorcode.com/questions/89/ui-datepicker-be-made-to-disable-saturdays-and-sundays-with-custom-date I use a datepicker for choosing an appointment day.I want to exclude Saturdays and Sundays from the available choices. Can this be done? If so, how? Wed, 08 Jun 2016 18:06:30 +0530 https://www.dorcode.com/questions/89/ui-datepicker-be-made-to-disable-saturdays-and-sundays-with-custom-date woocommerce cart not working for without login https://www.dorcode.com/questions/86/woocommerce-cart-not-working-for-without-login I am fairly new to woocommerce and although the other day the add to cart and cart page was displaying fine. I am now finding that going to my cart page brings up a blank page. Thu, 26 May 2016 23:36:34 +0530 https://www.dorcode.com/questions/86/woocommerce-cart-not-working-for-without-login how bootstrap modal rotate and show https://www.dorcode.com/questions/85/how-bootstrap-modal-rotate-and-show this css class add your bootstrap modal then see the magic Mon, 09 May 2016 02:11:12 +0530 https://www.dorcode.com/questions/85/how-bootstrap-modal-rotate-and-show PHP mysql search multiple tables using a keyword https://www.dorcode.com/questions/84/php-mysql-search-multiple-tables-using-a-keyword I have two tables in my database which are: user and event for PHP mysql search multiple tables using a keyword Thu, 05 May 2016 23:31:05 +0530 https://www.dorcode.com/questions/84/php-mysql-search-multiple-tables-using-a-keyword woo-commerce cart item session start and destroy after 30 Min. https://www.dorcode.com/questions/80/woo-commerce-cart-item-session-start-and-destroy-after-30-min woo-commerce cart item session start and destroy after 30 Min Thu, 28 Apr 2016 04:03:09 +0530 https://www.dorcode.com/questions/80/woo-commerce-cart-item-session-start-and-destroy-after-30-min Return all dates or time between two dates in an array https://www.dorcode.com/questions/77/return-all-dates-or-time-between-two-dates-in-an-array Return all dates or time between two dates in an array Wed, 20 Apr 2016 21:35:35 +0530 https://www.dorcode.com/questions/77/return-all-dates-or-time-between-two-dates-in-an-array How to add the media uploader in wordpress plugin https://www.dorcode.com/questions/76/how-to-add-the-media-uploader-in-wordpress-plugin When i click the first upload field (uploading process are success) after insert into post that corresponding media url is appear in the second field not in first. I am not sure where is the problem any suggestion would be great. Mon, 18 Apr 2016 11:18:30 +0530 https://www.dorcode.com/questions/76/how-to-add-the-media-uploader-in-wordpress-plugin .htaccess Tricks To Speed Up Your Website https://www.dorcode.com/questions/45/htaccess-tricks-to-speed-up-your-website Speed-up your website with these simple .htaccess tricks Tue, 15 Dec 2015 04:31:56 +0530 https://www.dorcode.com/questions/45/htaccess-tricks-to-speed-up-your-website how to post data using ajax https://www.dorcode.com/questions/42/how-to-post-data-using-ajax Tue, 08 Dec 2015 10:57:42 +0530 https://www.dorcode.com/questions/42/how-to-post-data-using-ajax how to get zip to address https://www.dorcode.com/questions/40/how-to-get-zip-to-address Mon, 07 Dec 2015 15:32:18 +0530 https://www.dorcode.com/questions/40/how-to-get-zip-to-address explode an array php not working https://www.dorcode.com/questions/38/explode-an-array-php-not-working Fri, 14 Aug 2015 11:01:52 +0530 https://www.dorcode.com/questions/38/explode-an-array-php-not-working php explode not working correctly https://www.dorcode.com/questions/37/php-explode-not-working-correctly After wordpress login redirect page but not refresh so please try to add these lines in the top of the your wordpress theme file like header.php or wp-config.php https://www.youtube.com/watch?v=ItTjUrTZ_JE Fri, 14 Aug 2015 10:59:23 +0530 https://www.dorcode.com/questions/37/php-explode-not-working-correctly