This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Infinite Scrolling for FAQs page. This sample code can be modified to handle infinite scrolling on any page for any type | |
content Text, Media etc. | |
/* | |
* Faqs load on scroll. | |
*/ | |
var track_page = 1; //track user scroll as page number, right now page number is 1 | |
var loading = false; | |
$('.load-more-faqs').hide(); | |
if ($('body').hasClass('tax-faqs_category')) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From drupal:8.5-apache | |
RUN apt-get update && apt-get install -y \ | |
curl \ | |
git \ | |
mysql-client \ | |
vim \ | |
wget | |
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \ | |
php composer-setup.php && \ | |
mv composer.phar /usr/local/bin/composer && \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To set up Docker on windows follow the instructions given in the following link: | |
https://docs.docker.com/toolbox/toolbox_install_windows/#step-2-install-docker-toolbox | |
1- Then go to your desktop and right click the 'Docker quick start terminal' and open properties. From there change | |
the target field and point it to your git bash.exe file press enter to save your settings. | |
2- To run the Docker client use CMD and go to : C:\program files\docker toolbox | |
enter start.sh into your terminal and press enter | |
Hope! You are good to go with your Docker installation. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
USER="YOUR USER NAME" | |
PASSWORD="YOUR PASSWORD" | |
ExcludeDatabases="Database|information_schema|performance_schema|mysql" | |
databases=`mysql -u $USER -p $PASWORD -e "SHOW DATABASES;" | tr -d "| " | egrep -v $ExcludeDatabases` | |
for db in $databases; do | |
echo "Dumping database: $db" | |
mysqldump -u $USER -p$PASSWORD --databases $db > `date +%Y%m%d`.$db.sql |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add following function to your theme's function.php and category will be counted while searching for products. | |
/** | |
* Adds Category taxonomy query to WP search query | |
* This addition will make the search more relevant | |
* @param type $query | |
*/ | |
function search_filter($query) { | |
if($query->is_search()) { | |
// category terms search. |