Posts

Showing posts with the label Wordpress

how to get value from CDATA with simplexmlelement in XML in php

it is a very simple thing. just get cast the value in string that's it see the example below:- <Product_Model> <![CDATA[WH4-P2649]]> </Product_Model> you must have all xml value in given below variale. $productsxml = simplexml_load_string($productsxml); now cast the tag like this . (string) $product->Product_Model; you will surely get your disered result. enjoy 😆😇

Wordpress WooCommerce Shop page contains the following hooks:

Image
woocommerce_before_main_content woocommerce_archive_description woocommerce_before_shop_loop woocommerce_before_shop_loop_item woocommerce_before_shop_loop_item_title woocommerce_shop_loop_item_title woocommerce_after_shop_loop_item_title woocommerce_after_shop_loop_item woocommerce_after_shop_loop woocommerce_after_main_content ----------------------------------------------------

maximum execution time error when importing sql data file since php.ini has been already set max execution time 3000

I am trying to import a large SQL data file using PHPMyAdmin in localhost This the config file for php.ini  max_exection_time : 30000 already set. but I still getting this problem. so I follow this step and now the problem has been solved. Solution:   There's a configuration variable within the phpMyAdmin directory that I find in  libraries\config.default.php  called  $cfg['ExecTimeLimit']  that I set according to my requirement now it has been fixed.

Memory size exhausted Error in PHP, Opencart, Wordpress

Hi, I getting below error in my opencart website. :  Allowed memory size of 67108864 bytes exhausted (tried to allocate 20000 bytes) in  /home/xxx/example.com/system/library/image.php to solving this error. I added these below code after  placing it at the beginning of the file. and problem has been solved. ini_set ( 'memory_limit' , - 1 ); For detail information. I also followed this Q/A. http://stackoverflow.com/questions/1948561/problem-using-imagecreatefromjpeg-and-imagejpeg

How do you avoid caching during development in WordPress?

1. How do you avoid caching during development in WordPress? OR 2. 3 Ways to easily stop WordPress caching your stylesheets OR 3. Stop WordPress caching styles (the quick and easy and dirty way) ANSWER 1.  The first way and the quickest is to just pop them into  header.php  after wp_head() has run, so you know your styles are definitely the last css loaded (unless of course there are inline styles in the page). You do this like so: < head >    . . . <?php wp_head ( ) ; ?>                                   <style type ="text/css">                     #bottom_logo {                          position : relative ; left : -20px ;                      }                      @media screen and (max-width: 768px) {                     #bottom_logo{                         padding-bottom: 20px;                      }                  }                  </style> < / head > 2.  The ne

Wordpress all Functions

https://codex.wordpress.org/Category:Functions

Woocommerce reset password button not working- Wordpress

Image
I was facing problem that woo-commerce reset password button was not working. it was always showing disabled.when I click on button it also not showing any error that we need email address to reset password. I fixed it on my own. I found that woo-commerce cart page is selected as my account page in admin in woo-commerce setting page. also in cart page have short code  [woocommerce_cart]   and  [woocommerce_my_account] .so both shortcode was collapsing to each other. so I removed  [woocommerce_my_account]   shortcode from cart page and also I set my account page for my account page in woo-commerce setting page. Now its working fine. :)