Forum Replies Created

Viewing 15 replies - 16 through 30 (of 85 total)
  • Hi
    Can you post the template with the code you are using as that might help.

    I don’t understand why you are styling it with Word…

    Morris

    Thread Starter morris373

    (@morris373)

    Hi
    I have created a ‘page’ template from a theme template with a right sidebar and I have saved it as page-(page-slug).php, where page-slug is the slug name of the page I created in WordPress i.e. page-baptisms.php

    I then added the pagination code below just outside of the loop:

    $pod = pods( 'baptism' );
    $params = array( 'limit' => 2 );
    $pod->find( $params );
    // Paginate
    echo $pod->pagination( array( 'type' => 'paginate' ) );

    Pods shortcode is as follows:

    [pods name="baptism" limit="2" orderby="baptism_date ASC" template="Baptism Grid Template"]

    Both limits have to be the same for pagination to work properly.

    At long last, I now have the pagination working and have it placed where it should be placed i.e. outside of the loop in its own Div.

    Morris

    Thread Starter morris373

    (@morris373)

    Hi Jory
    But that makes no sense calling it something else and I can’t find anything about it in your documentation, then I am told I can’t change the look of the auto generated Archive page unless I create a PHP page template.

    I get told to watch this particular video and that will help, well it doesn’t because the version of Pods is different and it uses Archive instead of Lists in the Pods settings. So if you are trying to learn the basics it gets very hard when items change in other versions.

    Watching some of your videos, I am sure it says, I won’t need to touch anymore PHP files as the Pods templates does that job. For me it is easier to use your Pods templates as I can see the fields I need referenced down the right side bar.

    I have added the template under Lists and it doesn’t change the look of the Archive page. The CPT has Archive set and with a page slug.

    Anyhow I can get all of the records for a CPT or Pod from using your Pods Templates so that kind of making the auto archive page redundant.

    Morris

    Hi
    Can’t view the pages with those links as it looks like it wants you to login first.

    Morris

    Thread Starter morris373

    (@morris373)

    Hi Jory
    I have removed the [if] and [each] elements and the table is now working.

    Cheers

    Morris

    Thread Starter morris373

    (@morris373)

    Hi Jory
    I still can’t see how I can add a custom template to use just for an archive page.

    Old video shows where to put it probably in an older version of Pods but I don’t have that option on mine or the label has been changed.

    I have Singular Template and I have List Template but no Archive Template so where am I adding this Custom template please? I need to change how the Archive page looks as it has no custom fields in it.

    Morris

    Hi
    I have 1 CPT called Ceremonies, which is based on a Church’s Registers eg Baptisms, Marriages and Burials. I have another CPT called People which is related to the Ceremonies CPT.

    I also have a Taxonomy called Ceremony Type and I can select one depending on the Ceremony that I am adding for a person.

    When I view All Ceremonies I can see all of them and see that I have Baptisms, Marriages and Burials all mixed in.

    If I want to add a Ceremony of a Burial to a person in my People CPT, I would need to select it from the Ceremonies dropdown but I will have Baptisms and Marriages all mixed in as well. So if I use the Where clause I can set it to ‘Burials’ only and that will filter out Baptisms and Marriages so now I can just search through the dropdown just has Burials in it and find the right one, well that’s if I have already have added a Burial for that person.

    I could get a bit more clever here by using Where and add the Surname that would then filter all of the Surnames to that particular name. If it wasn’t found, then I haven’t added it so I would then just click on Add New and add it.

    Hopefully that explains the Where clause and how I used it.

    Morris

    Hi
    Yes there is a bug in the latest Pods version and it won’t work using the Where clause. See below:

    Bug in Pods version 2.7.26

    You need to downgrade to 2.7.24 for the Where clause to work. I did that and now I can’t add anything New in Pods.

    Because I am doing a Church’s website I wanted to filter for either Baptism, Marriage or Burial from the registers and I used the following in the Customised Where text box as:

    ceremony_type.name=”baptism”

    ceremony_type was a taxonomy.

    I hope this helps in the meantime as I spent 2 days trying to get the Where clause to work.

    Morris

    • This reply was modified 3 years, 10 months ago by morris373.

    Hi JJci
    I am having the same problem as I don’t know the right syntax to use to filter a CPT with a related Taxonomy.

    Where is basically a filter and you use a field in a taxonomy or category to return only those results.

    So if you had a Taxonomy that has values of A, B and C and you would like to filter B and C out of the results and just leave A then you would use Where.

    i.e Where taxonomy name = “A”

    How you use it is a mystery at the moment. In a database this would be known as a Query.

    Hopefully that explains that and no doubt Jory will be back and help us how to actually use it.

    Morris

    Thread Starter morris373

    (@morris373)

    Hi
    I viewed a video you suggested and it made better sense but I am still getting a bit confused.

    When I set up the 2 CPTs, I didn’t enable the archive page, so I did that and I changed the page slug. I can now get all of the deceased people and all the graves onto their own separate page and now the theme’s built in pagination works.

    Before enabling the archive page, I had used a php template file that I have on my other website and changed the fields and post type and that worked for one of the post types i.e. deceased. The Grave CPT, I wanted to add all graves, add all deceased people in that same grave and I didn’t know how to. That’s why I asked about the [each grave_number] as I would have needed the equivalent code to modify my template.

    But how can you alter the archive page to show more details, say for each grave? At the moment all I am getting is just the page title and no custom fields.

    On the older videos, the auto templates section mentions the Archive template to use but that is not on the newer version 2.7.25 I am using now.

    Thanks

    Morris

    Thread Starter morris373

    (@morris373)

    Hi Jory
    At the moment I only have 10 Graves and I want to limit the Graves per page to 9 only as it gives me a complete block on the one page. I want to get it working first on a localhost website and then put it onto the main website.

    I am using Mesmerize’s blog page or code to output the Graves into like blog items, which uses Cards and it’s perfect for what I want.

    This is how I did it using another CPT plugin.

    Graves

    WHen I first started this project, I based it on the Graves only and with the deceased person buried there. I didn’t know how else to do it.

    Now, I just want to display all of the Burial Register (36 pages with 282 deceased people) so people can search it on the website like another local church has done. My only problem is my knowledge of PHP programming and using templates.

    Cheers for your constant help.

    Morris

    Thread Starter morris373

    (@morris373)

    Hi Jory
    How can I correct it, I have only used one of your samples of code so I am a bit lost with what to use.

    Morris

    Thread Starter morris373

    (@morris373)

    Hi
    When I add a deceased person from the frontend via the form I cannot add the taxonomy as I don’t know how to.

    So a deceased person is buried by a Vicar or Clergy and that is set up as a Taxonomy but I can’t see how I can add the Taxonomy Clergy to the Burial Register form.

    How can I do it, please? If I can’t then the frontpage forms are useless. I will have to go into the backend when my co researcher has added the deceased people and then add the Vicar who buried them.

    Thanks

    Morris

    Thread Starter morris373

    (@morris373)

    Hi
    Yes they can only be buried once so I was thinking if that date has been added then there must be someone buried at the cemetery.

    But I can’t get it to work, do you know why?

    Thanks

    Morris

    Thread Starter morris373

    (@morris373)

    Hi again
    I have got it working now by adding this code as the code wanted the ID or the category slug and I was already getting the category slug within the template so I just replaced it with that:

    $case_study_cat_slug = get_queried_object()->slug;
    $case_study_cat_name = get_queried_object()->name;
    $clergy_title = pods_field('clergy', $case_study_cat_slug, 'clergy_title', 
    $single=true);
    <h2><?php echo $case_study_cat_name . ' - ' . $clergy_title; ?></h2>

    I will know now how to get the other values if needed i.e. learn by example.

    Thanks

    Morris

    • This reply was modified 3 years, 10 months ago by morris373.
Viewing 15 replies - 16 through 30 (of 85 total)