Query Block Test

adding a block with all the possible slick slider settings is a bit of a chore so the following is a way to simplify it by using data-slide attributes.

$data_slick = get_field('data_slick');
$responsive = get_field('responsive');
if ($responsive) {
	$responsive = ', "responsive": [' . $responsive . ']';
} else {
	$responsive = '';
}
data-slick='{<?php if ($data_slick) { echo $data_slick . $responsive; } ?>}'

c

Example field settings for data_slick text area ACF field:

“slidesToShow”: 2, “dots”: false, “slidesToScroll”: 1, “autoplay”: true, “infinite”: true, “speed”: 200, “fade”: true

Example field settings for responsive options using a text area ACF field:

{“breakpoint”:600, “settings”:{“slidesToShow”: 1, “dots”: true}}

or

{“breakpoint”:600, “settings”:{“slidesToShow”: 1, “dots”: true}}, {“breakpoint”:1000, “settings”:{“slidesToShow”: 2, “dots”: true}}

Important

don’t having trailing commas where they are not needed!

use double quotes for all properties

check that each of your settings at each of the breakpoints are being applied!

More details: https://kenwheeler.github.io/slick/

PHP:

  1. File Names:
    • Use lowercase letters.
    • Separate words with underscores (_).
    • Example: my_custom_template.php
  2. Function Names:
    • Use lowercase letters.
    • Use underscores to separate words.
    • Be descriptive and use verbs for functions.
    • Example: get_post_title()
  3. Variable Names:
    • Use lowercase letters.
    • Use underscores to separate words.
    • Be descriptive and use nouns for variables.
    • Example: $user_id
  4. Class Names:
    • Use uppercase letters for the first letter of each word (PascalCase).
    • Be descriptive and use nouns.
    • Example: My_Custom_Class
  5. Constants:
    • Use uppercase letters.
    • Separate words with underscores.
    • Example: MY_CONSTANT_VALUE
  6. Hooks (Actions and Filters):
    • Use lowercase letters.
    • Use underscores to separate words.
    • Be descriptive and use verbs for actions.
    • Example: add_action('init', 'my_custom_function');
  7. Prefixes:
    • Add a unique prefix to your functions, variables, classes, etc., to avoid naming conflicts.
    • Example: myplugin_custom_function()
  8. Database Tables:
    • Use lowercase letters.
    • Separate words with underscores.
    • Be descriptive and use nouns.
    • Example: wp_my_plugin_settings

CSS/SCSS:

  1. Selectors (Classes and IDs):
    • Use lowercase letters.
    • Separate words with hyphens (-).
    • Be descriptive.
    • Example: .my-custom-container or #my-custom-element
  2. Naming for Styles:
    • Use lowercase letters.
    • Be descriptive and use hyphens to separate words.
    • Example: font-size, background-color
  3. File Names:
    • Use lowercase letters.
    • Separate words with hyphens (-).
    • Example: styles.css or main-styles.scss

JavaScript:

  1. Variable Names:
    • Use camelCase for variables.
    • Be descriptive and use nouns.
    • Example: myVariableName
  2. Function Names:
    • Use camelCase for functions.
    • Be descriptive and use verbs.
    • Example: getUserData()
  3. Object Names:
    • Use camelCase.
    • Be descriptive and use nouns.
    • Example: myObject
  4. Constants:
    • Use uppercase letters.
    • Separate words with underscores.
    • Example: MAX_VALUE
  5. Event Handlers:
    • Use camelCase.
    • Be descriptive.
    • Example: onClickHandler
  6. File Names:
    • Use lowercase letters.
    • Separate words with hyphens (-).
    • Example: main-script.js

FadeInUp – delay: five second – speed: faster

FadeInUp – delay: 200 milliseconds – speed: slower

WordPress Theme

We have manay patterns and animations

Search the site


Address

123 Main Street
Town
City
P05T C0D3

Tel: 01234 567 899

Mob: 01234 567 899

Email: ben@gomopress.com


Copyright 2023. Blah blah blah Company Limited