From 37f0db614a3557271dbec297df6271e4c61ef7f0 Mon Sep 17 00:00:00 2001 From: gine Date: Sun, 2 Nov 2014 21:47:15 +0100 Subject: [PATCH] Gestione dello shortcode di tipo page e README --- README.md | 17 ++++- home-cats.php | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++ index.php | 25 +++++++ 3 files changed, 225 insertions(+), 1 deletion(-) create mode 100644 home-cats.php create mode 100644 index.php diff --git a/README.md b/README.md index 180d14c..85a18ba 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,19 @@ sahifa-box-em-all ================= -Plugin per wordpress che permette di creare dei box sul modello di quelli di sahifa \ No newline at end of file +Plugin per wordpress che permette di creare dei box sul modello di quelli di sahifa. Il tema Sahifa รจ necessario. + +attrs +===== + +- type = page | event : (Required) Tipo di post +- ids : (Required) Serie di numeri concatenati da virgole. Gli id da prelevare. +- num = (Default 12) : (Optional) Numero di articoli da inserire nella box +- layout = 1c | 2c : (Optional) Tipo di Layout da ottenere + +example +======= + +- [sbea type="page" ids="11,22"] +- [sbea type="page" ids="11,22" layout="1c" num="4"] + diff --git a/home-cats.php b/home-cats.php new file mode 100644 index 0000000..ee26ab5 --- /dev/null +++ b/home-cats.php @@ -0,0 +1,184 @@ + + //$post_type=ai1ec_event + 'page', + 'post__in' => $page_ids, + 'no_found_rows' => 1, + 'posts_per_page' =>$Posts, + 'offset'=> '', + 'orderby' => 'rand' + ); + + $cat_query = new WP_Query($args); + + $count = 0; + +?> + + +
+
+

+
+
+
+ + have_posts()): ?> +
    + have_posts() ) : $cat_query->the_post(); $count ++ ;?> + +
  • > +
    + +
    + + + + +
    + + +

    + +
    + + +
    +
    +
  • + +
  • > + +
    + +
    + +

    +
  • + + +
+ + +
+
+ + + +
+
+

+
+
+
+ + have_posts()): ?> +
    + have_posts() ) : $cat_query->the_post(); $count ++ ;?> + +
  • > +
    + +
    + + + + +
    + + +

    +
    + + +
    +
    +
  • + +
  • > + +
    + +
    + +

    +
  • + + +
+
+ + +
+
+ + + +
+
+

+
+
+
+ + have_posts()): ?> +
    + have_posts() ) : $cat_query->the_post(); $count ++ ;?> + +
  • > + +
    + + + + +
    + + +

    + +
    + + +
    +
  • + +
  • > + +
    + +
    + +

    +
  • + + +
+
+ + +
+
+ + + \ No newline at end of file diff --git a/index.php b/index.php new file mode 100644 index 0000000..3f701e8 --- /dev/null +++ b/index.php @@ -0,0 +1,25 @@ +