• Contact
  • french
  • german
  • spanish
xiligroup dev
a multilingual WP site for Web developments
Aller au contenu
  • Home
  • Archives (previous website)
  • Forums
  • About

templating xili-tidy-tags

dev.xiligroup is being renovated › Forums › xili-tidy-tags plugin › templating xili-tidy-tags

Tagged: group, loop, post_tag, semantic, tag, taxonomy, template tag, xili-tidy-tags

This topic contains 0 replies, has 2 voices, and was last updated by  xiligroup dev 14 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • September 28, 2010 at 6:49 #2798

    Anonymous

    I’d like to know if there is a way to just get an array of tags names and IDs that exist in a certain group. For example:

    Group: Food

    Tags in Group: Sandwich, Salad, Cake, Pie

    xili_get_group_tags(‘Food’); would then return

    array( array(‘Sandwich’,1), array(‘Salad’, 2), array(‘Cake’, 3), array(‘Pie’, 4))

    Is this possible with the current available code, if not, could you give me an idea of what i’d have to do to create this function?

    October 3, 2010 at 13:10 #2800

    xiligroup dev
    Keymaster

    To do that you must use embedded new taxonomy functions inside plugin’s source :

    get_terms_of_groups_new ( $group_id, $taxonomy, $taxonomy_child, $args )

    Here I write a ‘raw’ example delivering expected array (here only print_r)

    /**
    * example of selection of tags of a group as used in xili-tidy-tags dashboard<br />
    * only for tests<br />
    *
    */
    function xili_tags_from_group($group_name) {
    // from $group_name to ID
    $taxonomy = TAXOTIDYTAGS ;
    $taxonomy_child = 'post_tag' ;
    $groupterm = term_exists($group_name, $taxonomy);
    $group_id = $groupterm['term_id'];
    // return array of tags as object
    $args = array('orderby' => 'name', 'order' => 'ASC', 'hide_empty' => false ); // even if no post attached to a tag - see doc inside source of xili-tidy-tags
    $thetags = get_terms_of_groups_new ( $group_id, $taxonomy, $taxonomy_child, $args );>
    print_r($thetags);
    // example of array as expected by S.Y. but here with key -
    $result_array = array();
    if ( $thetags ) {
    foreach ( $thetags as $onetag ) {
    $result_array[] = array('tag_name' => $onetag->name, 'tag_id' => $onetag->term_id);
    }
    print_r($result_array);
    }
    }

    The default taxonomy (see file taxonomy.php in folder wp-includes) is very poweful but don’t include the queries to group tags under one another tag. Is is the purpose of this plugin xili-tidy-tags created since WP 2.7 ! Initially created to group tags by language, he structurally contains all functions to group tags by semantic groups AND one tag can belong to one or more groups.

    Michel

    dev.xiligroup.com

  • Author
    Posts
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

  • Website under renovation

    During renovation, previous posts remain available via Archives entry in navigation menu.
  • RSS 2014-xili

  • RSS Wp tips and tricks

  • RSS 2013-xili

  • Plugins at WordPress.org

    xili-language
    xili-tidy-tags
    xili-dictionary
    xili-floom-slideshow
    xilitheme-select
    xili-sifr3-active
    xili-postinpost

  • FORUMS

    • Forums login
      • Forums registration page
    • Forums in english
      • xili-language plugin
      • xili-tidy-tags plugin
      • xili-dictionary plugin
      • Other plugins
        • xili-floom-slideshow
        • bbPress plugins
    • Forum des extensions xili-language
  • Sites of interest

    • A forum about xiligroup dev plugins Support, exchanges, wishes about xiligroup plugins for WP or bbPress
    • Multisite, multilingual demo and how to… Multisite mode, multilingual demo and how to use xili plugins..
    • Twenty Twelve xili multilingual 2012 – xili
    • TwentyEleven multilingual theme TwentyEleven child multilingual theme by dev.xiligroup, demo and how to…
    • xiliphone kit A site to present a wordpress theme for iphone
  • WP codex

    • Development Blog
    • Documentation
    • Multilingual WordPress in codex
    • WordPress Plugins
    • WP in your language
  • WordCamp Paris 2015, J’y serai ! Et vous ? [M à J] Suite à la mise à disposition de nouvelles places ce dimanche, j'ai réussi à m'inscrire pour les 2 jours... J'espère que ce samedi, il y aura une réflexion sur la contribution et le travail collectif. Faute de places, je ne serais qu'à la journée de vendredi 23/1. Pour le samedi, on peut prendre RDV dans un bistrot ou aller dans un des musées magnifiques de Paris !
xiligroup dev
Multilingual child theme of twentyten by dev.xiligroup - Fièrement propulsé par WordPress

Nous utilisons des cookies pour vous offrir la meilleure expérience sur notre site.

You can find out more about which cookies we are using or switch them off in settings.

xiligroup dev
Powered by  GDPR Cookie Compliance
Résumé de la politique de confidentialité

Ce site utilise des cookies afin que nous puissions vous fournir la meilleure expérience utilisateur possible. Les informations sur les cookies sont stockées dans votre navigateur et remplissent des fonctions telles que vous reconnaître lorsque vous revenez sur notre site Web et aider notre équipe à comprendre les sections du site que vous trouvez les plus intéressantes et utiles.

Cookies strictement nécessaires

Cette option doit être activée à tout moment afin que nous puissions enregistrer vos préférences pour les réglages de cookie.

Si vous désactivez ce cookie, nous ne pourrons pas enregistrer vos préférences. Cela signifie que chaque fois que vous visitez ce site, vous devrez activer ou désactiver à nouveau les cookies.