예제 #1
0
<?php

require_once $libpath = substr(str_replace('\\', '/', __DIR__), 0, -40) . 'library/initialize.php';
$id = category_details(NULL, "Books and CDs");
$products = Product::find_by_field("category_id", $id);
include $dir_categories . 'books-and-cds.php';
예제 #2
0
echo output_message($message);
?>
    <h3>Find a product:</h3>
    <form id="search-form" action="<?php 
echo HOME;
?>
search" method="post">
      <input id="search-box" autofocus class="form-control" type="text" name="keyword" placeholder="Name of the product" > <br />
    </form>
   
    <div id="display">
    <?php 
foreach ($products as $product) {
    ?>
     <?php 
    $cat_name = category_details($product->category_id, NULL);
    ?>
     <div class="col-lg-4 col-md-4 col-sm-6 col-xs-5">
      <div>
        <p>
          <span class="visible-lg visible-md visible-sm"><b>Category:</b> <?php 
    echo $cat_name;
    ?>
<br/></span>
          <span class="visible-lg visible-md visible-sm visible-xs"><b>Product:</b> <?php 
    echo $product->name;
    ?>
<br /></span>
        </p>
    
        <a class="thumbnail" href="<?php 
예제 #3
0
<?php

require_once $libpath = substr(str_replace('\\', '/', __DIR__), 0, -40) . 'library/initialize.php';
$id = category_details(NULL, "Clothing and Accessories");
$products = Product::find_by_field("category_id", $id);
include $dir_categories . 'clothing-and-accessories.php';
예제 #4
0
<?php

require_once $libpath = substr(str_replace('\\', '/', __DIR__), 0, -40) . 'library/initialize.php';
$id = category_details(NULL, "Electronics and Computer");
$products = Product::find_by_field("category_id", $id);
include $dir_categories . 'electronics-and-computer.php';
    function accesspress_mag_slider_cb()
    {
        $slider_post_option = of_get_option('slide_post_option', 'by_latest_post');
        $slider_category = of_get_option('homepage_slider_category');
        $category_box_option = of_get_option('slider_cat_box_option', '1');
        $slide_count = of_get_option('count_slides', '2');
        if ($slide_count == 0) {
            $posts_perpage_value = 4;
        } elseif (empty($slider_category) && $slider_post_option == 'by_category') {
            $posts_perpage_value = 4;
        } else {
            $posts_perpage_value = $slide_count * 4;
        }
        $slide_info = of_get_option('slider_info', '1');
        $posts_perpage_value = apply_filters('slider_posts', $posts_perpage_value);
        $posts_order_vlaue = 'DESC';
        $posts_order_vlaue = apply_filters('slider_order', $posts_order_vlaue);
        $slider_args = array('post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => $posts_perpage_value, 'order' => $posts_order_vlaue);
        if ($slider_post_option == 'by_category') {
            $slider_args['category_name'] = $slider_category;
            $slider_args['meta_query'] = array(array('key' => '_thumbnail_id', 'compare' => '!=', 'value' => null));
        } elseif ($slider_post_option == 'by_featured_post') {
            $slider_args['meta_query'] = array('relation' => 'AND', array('key' => '_thumbnail_id', 'compare' => '!=', 'value' => null), array('key' => 'post_featured_on_slider', 'value' => '1', 'compare' => '='));
        } else {
            $slider_args['meta_query'] = array(array('key' => '_thumbnail_id', 'compare' => '!=', 'value' => null));
        }
        $slider_query = new WP_Query($slider_args);
        $slide_counter = 0;
        if ($slider_query->have_posts()) {
            echo '<div id="homeslider">';
            while ($slider_query->have_posts()) {
                $slide_counter++;
                $slider_query->the_post();
                $post_image_id = get_post_thumbnail_id();
                $post_big_image_path = wp_get_attachment_image_src($post_image_id, 'accesspress-mag-slider-big-thumb', true);
                $post_small_image_path = wp_get_attachment_image_src($post_image_id, 'accesspress-mag-slider-small-thumb', true);
                $post_single_image_path = wp_get_attachment_image_src($post_image_id, 'accesspress-mag-singlepost-default', true);
                $post_image_alt = get_post_meta($post_image_id, '_wp_attachment_image_alt', true);
                $slider_layout = of_get_option('slider_layout', 'slider-default');
                if ($slider_layout == 'slider-default') {
                    if ($slide_counter % 4 == 1) {
                        ?>
                        
                    <div class="slider">
                        <div class="apmag-slider-bigthumb">
                            <a href="<?php 
                        echo the_permalink();
                        ?>
" title="<?php 
                        the_title();
                        ?>
">
                            <div class="big_slide wow fadeInLeft">
                                <div class="slide-image">
                                    <img src="<?php 
                        echo $post_big_image_path[0];
                        ?>
" alt="<?php 
                        echo esc_attr($post_image_alt);
                        ?>
" />
                                    <?php 
                        if ($category_box_option == '1') {
                            ?>
                                        <div class="big-cat-box">
                                            <?php 
                            category_details(get_the_ID());
                            do_action('accesspress_mag_post_meta');
                            ?>
                                        </div>
                                    <?php 
                        }
                        ?>
                                </div>
                                <?php 
                        if ($slide_info == 1) {
                            ?>
                                <div class="mag-slider-caption">
                                  <h2 class="slide-title"><?php 
                            the_title();
                            ?>
</h2>
                                </div>
                                <?php 
                        }
                        ?>
                            </div>
                            </a>
                        </div>                                 
                        
            <?php 
                    } else {
                        if ($slide_counter % 4 == 2) {
                            echo '<div class="small-slider-wrapper wow fadeInRight">';
                        }
                        ?>
                
                       <div class="apmag-slider-smallthumb">
                       <a href="<?php 
                        echo the_permalink();
                        ?>
" title="<?php 
                        the_title();
                        ?>
">
                        <div class="small_slide">
                            <?php 
                        $cat_info = get_the_category();
                        $cat_link = get_category_link($cat_info[0]->cat_ID);
                        $cat_name = $cat_info[0]->name;
                        ?>
                            <div class="slide-image"><img src="<?php 
                        echo esc_url($post_small_image_path[0]);
                        ?>
" alt="<?php 
                        echo esc_attr($post_image_alt);
                        ?>
" /></div>
                            <div class="mag-small-slider-caption">
                              <?php 
                        if ($slide_info == 1) {
                            ?>
<h3 class="slide-title"><?php 
                            the_title();
                            ?>
</h3><?php 
                        }
                        ?>
                            </div>                            
                        </div>
                       </a>
                       <?php 
                        category_details(get_the_ID());
                        ?>
                       </div>
            <?php 
                    }
                    if ($slide_counter % 4 == 0) {
                        ?>
                    </div>
                    </div>
            <?php 
                    }
                } else {
                    ?>
                    <div class="slider">
                        <div class="apmag-slider-single">
                            <a href="<?php 
                    echo the_permalink();
                    ?>
" title="<?php 
                    the_title();
                    ?>
">
                            <div class="big-single-slide wow fadeInLeft">
                                <div class="slide-image non-zoomin">
                                    <img src="<?php 
                    echo $post_single_image_path[0];
                    ?>
" alt="<?php 
                    echo esc_attr($post_image_alt);
                    ?>
" />
                                    <?php 
                    if ($category_box_option == '1') {
                        ?>
                                        <div class="big-cat-box">
                                            <?php 
                        category_details(get_the_ID());
                        do_action('accesspress_mag_post_meta');
                        ?>
                                        </div>
                                    <?php 
                    }
                    ?>
                                </div>
                                <?php 
                    if ($slide_info == 1) {
                        ?>
 <div class="mag-slider-caption"><h2 class="slide-title"><?php 
                        the_title();
                        ?>
</h2></div><?php 
                    }
                    ?>
                            </div>
                            </a>
                        </div>
                    </div>
            <?php 
                }
            }
            echo '</div>';
        }
        wp_reset_query();
    }
예제 #6
0
파일: other.php 프로젝트: hc-hacker/OLX
<?php

require_once $libpath = substr(str_replace('\\', '/', __DIR__), 0, -40) . 'library/initialize.php';
$id = category_details(NULL, "Other");
$products = Product::find_by_field("category_id", $id);
include $dir_categories . 'other.php';
예제 #7
0
<?php

require_once $libpath = substr(str_replace('\\', '/', __DIR__), 0, -40) . 'library/initialize.php';
$id = category_details(NULL, "Home and Furniture");
$products = Product::find_by_field("category_id", $id);
include $dir_categories . 'home-and-furniture.php';
예제 #8
0
<?php

require_once $libpath = substr(str_replace('\\', '/', __DIR__), 0, -40) . 'library/initialize.php';
$id = category_details(NULL, "Mobiles and Tablets");
$products = Product::find_by_field("category_id", $id);
include $dir_categories . 'mobiles-and-tablets.php';
예제 #9
0
파일: vehicles.php 프로젝트: hc-hacker/OLX
<?php

require_once $libpath = substr(str_replace('\\', '/', __DIR__), 0, -40) . 'library/initialize.php';
$id = category_details(NULL, "Vehicles");
$products = Product::find_by_field("category_id", $id);
include $dir_categories . 'vehicles.php';