Skip to content

Instantly share code, notes, and snippets.

View teresko's full-sized avatar

Mārtiņš Tereško teresko

View GitHub Profile
<?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>
@teresko
teresko / short
Last active August 29, 2015 14:27 — forked from janisdonis/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'),
<?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'],