Skip to content

Instantly share code, notes, and snippets.

WP-Property with Supermap - options YouTube

Website root directory

shortcode

<section id="properties" class="js-properties properties">[supermap zoom=13 price=all sort_by=price sort_order=ASC bedrooms=all baths=all municipality=all neighborhood_and_nearby=all center_on='38.641312,-90.295525']</section>

Options:
center_on='38.641312,-90.295525'

Deploy from Bitbucket to Plesk using Codeship using sshpass and SFTP YouTube

Website root directory

deploy/staging

put -rp /home/rof/clone/web/wp-content/* /staging-domain-name.com/wp-content

deploy/production

Deploy Nuxt Universal to AWS Elastic Beanstalk via AWS CodePipeline and Bitbucket YouTube

Procfile

web: npm run deploy

package.json

"deploy": "npm run build && npm run start"
@atazmin
atazmin / WordPress-Speedbump-with-ACF.md
Last active September 27, 2022 13:22
WordPress-Speedbump-with-ACF

speedbump.php

<?php if ( have_rows( 'speedbump', 'option' ) ) : ?>
  <?php while ( have_rows( 'speedbump', 'option' ) ) : the_row(); ?>
    <?php 
      $isEnabled = get_sub_field( 'isEnabled' );
      $main_content = get_sub_field( 'main_content' );
      $cancel_content = get_sub_field( 'cancel_content' );
      $cancel_button_text = get_sub_field( 'cancel_button_text' );    

Bottom out of viewport

window.addEventListener('scroll', function() { 
      var isOut = isBottomOutOfViewport($formstackContactUsFormTarget);
      console.log(isOut)

      if (isOut) {
        $formstackContactUsFormTriggerCloned.addClass('formstack-contact-us-form-cloned--visible');
      } else {
@atazmin
atazmin / Show-element-based-on-url-query.md
Last active June 12, 2020 14:47
WordPress Title tags modifiers
jQuery(document).ready( function($) {

  var $linkToOpenPrintDialog = $('#tvcPrintThisLinkId');
  var windowObjectReference = null;
  var windowFeatures = 'left=0,top=0,width=800,height=900,menubar=no,toolbar=no,location=yes,resizable=no,scrollbars=no,status=no';
  var windowFeaturesStyles = '<link rel="stylesheet" media="print" href="/wp-content/themes/salient-child/dist/css/app-print.css">';
  
  $linkToOpenPrintDialog.on('click', function(event) {
    openPrintDialog(this.href, this.target, 'tvcInnerCalculatorDivId', event);    

YouTube


.Setup Commands

git config --global user.name "Bitbucket to CodeShip to WP Engine deploy"
git config --global user.email "name@example.com"
mkdir /home/rof/clone/wp-content
cp -rp /home/rof/clone/web/* /home/rof/clone/wp-content/