• Resolved Patri Ruiz

    (@llamacreativa)


    Hello how are you? Pods is a super plugin. Congratulations. I loved
    I have installed your plugin in my template, but I have some questions. First, I explain what this project is about.

    I have 2 main tables: Animal and owners
    This animal foundation will record all the castrations and vaccinations they offer free to the community. They will only be entered and they will be consulted.

    Animal
    – Animal_name
    – description
    – Specie: personalized list (Feline, Canine)
    – sex: personalized list (Female, Male)
    – situation: personalized list (Has a home, Transitional home, Community animal, Homeless)
    – Animal race: personalized list (Mestizo, Pedigree)
    – owner (Relationship (Two-way field owner)
    – age
    – castracion: personalized list (Yes, No)
    – caduction_date
    – vaccine: personalized list (Yes, No)
    – date_vaccination
    – observations_animal

    owner
    – responsible_name
    – cellular phone
    – email_electronic
    – address
    – province: personalized list (La Pampa, Buenos Aires, Córdoba)
    – locality: personalized list (Santa Rosa, General Acha, Bernasconi, Huinca Renancó, Tres Lomas)
    – observations_cuidador
    – Animals (Relationship (Two-way field animals)

    My question would be: How can I make a template Pods where I list:

    / * Number of animals entered into the system: * /
    SELECT COUNT (*) AS AmountOfAnimals FROM wp_postmeta WHERE meta_key = ‘animal’;

    / * Number of owner entered into the system :: * /
    SELECT COUNT (*) AS AmountOfCovers FROM wp_postmeta WHERE meta_key = ‘owner’

    / * Number of cats entered into the system: * /
    SELECT COUNT (*) AS AmountOfLeafs FROM wp_postmeta WHERE meta_key = ‘specie’ AND meta_value = ‘Feline’

    / * Number of dogs entered into the system: * /
    SELECT COUNT (*) AS AmountOfCanines FROM wp_postmeta WHERE meta_key = ‘specie’ AND meta_value = ‘canine’

    / * Number of castrations * /
    SELECT COUNT (*) AS AmountOfTracks FROM wp_postmeta WHERE meta_key = ‘castration’ AND meta_value = ‘Yes’

    / * Amount of vaccinations * /
    SELECT COUNT (*) AS NumberOfVaccinations FROM wp_postmeta WHERE meta_key = ‘vaccine’ AND meta_value = ‘Yes’

    What I need is for it to be visualized in the sidebar as a reminder of everything they are achieving.

    I saw that I had several widgets, which should I use?

    In MySql I use COUNT (*). I know you use total_found () (I saw it in your answers in your forum).

    I do not know how to use the total_found() in the template. I tried a whole day and I could not.

    I only managed to make a single call on a page using a template:
    [pods name = “animal” where = “specie.meta_value = ‘canine'” template = “template page grid animal canine”] -> List all the canines.

    Help me please.
    Thank you
    Patricia

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Create template for Widget (for SideBar)’ is closed to new replies.