Skip to content

Instantly share code, notes, and snippets.

Avatar

Mārtiņš Tereško teresko

View GitHub Profile
View gist:2b199b9ae22a2a3526e1
<?php
public function addhw() {
$array=array(
'hw_name' => $_POST['hw_name'],
'hw_description' =>$_POST['hw_description'],
'hw_model' => $_POST['hw_model'],
'hw_serialno' => $_POST['hw_serialno'],
'hw_manufacturer_id' => $_POST['manufacturer_id'],
View short
$args = array(
'post_type' => 'products',
'tax_query' => array(),
);
if(get_field('multi_filter') ) {
$temp = array();
while(has_sub_field('multi_filter')){
$_temp = array(
'taxonomy' => get_sub_field('taxonomy'),
View gist:8bd572cc40baef6304e5
<?php
$tempList = [];
foreach( $images as $image ) {
$tempList[] = "<img src='{$image['sizes']['large']}'>";
}
?>
<script id="images2<?php echo get_the_ID(); ?>" type="text/cycle">
<?php echo json_encode($tempList); ?>
</script>