• Resolved efaycal

    (@efaycal)


    Hello,
    I want to create a pagination on a archive page.
    I had already created the template inside of the pods template

    <!--+++++++++++PORTFOLIO ITEM+++++++++++-->
            <div class="portfolio oceans terres atmosphere" style="display: inline-block;" data-bound="">
                <div class="item_paysage"> 
                  <a class="item_link" a href="?p={@ID}">
                    <div class="vignette"> 
                        <div class="substitute_img fa fa-users"></div>
                        <!--<img class="masque" src="https://wordpress.localhost/wp-content/themes/ipsltheme/ipsl/img/masque_paysage.png" alt="Masque IPSL"> -->
                        <img class="masque noprint" src='[masque name="portrait"]' alt="Marque IPSL"> 
                    </div>
                  </a>
                  <figcaption>
                    <div class="img_title">{@post_title}</div>
                    <div class="propos_img">{@ezdescription} </div>
                  </figcaption>
                  
                  <button class="btn nuance-1"><a href="?p={@ID}"><span class="btn_title">Voir l'offre</span></a></button>
                  <!--<button class="btn nuance-1"><a href="#"><i class="fa ipsl_sphere"></i></a><span class="btn_action">Site dédié</span></button>-->
                </div>
              </div>
          <!--FIN PORTFOLIO ITEM-->

    Then I created a new page and add the shortcode :

    [pods name="emploi" pagination=”true” orderby="eznaturecontrat.post_name desc, post_date desc" template="archive_template_emploi" limit="5" where="t.post_status in('publish')" ]

    But I can’t see the pagination on my page, what did I missed please ?

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support Paul Clark

    (@pdclark)

    See https://www.ads-software.com/support/topic/pagination-type-via-pods-shortcode/

    You may need to specify a pagination type. e.g., pagination="true" pagination_type="paginate"

    Thread Starter efaycal

    (@efaycal)

    Thanks I already saw this topic but even when I write

    [pods name="emploi" limit="5" pagination=”true” pagination_type="paginate" orderby="eznaturecontrat.post_name desc, post_date desc" template="archive_template_emploi" where="t.post_status in('publish')" ]

    There is no pagination displayed. Is there other things to specify somewhere ?

    I use a custom template developped by another guy, do I have to add some function inside of it ?

    Sorry I’m a newbie in wordpress custom theme.

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @efaycal

    Are you sure your query contains more than 5 objects?
    For example, I’m not sure if your orderby param is correct. What is eznaturecontrat.post_name?

    Cheers, Jory

    Thread Starter efaycal

    (@efaycal)

    Hi @keraweb thank’s for your help.

    Yes I’m sure there are more than 5 objects if I delete the limit all my object are displayed and it’s not what I want. I want to show 5 objects and a pagination who show the others objects. I don’t have issues about showing the objects on the page I “just” can’t display a pagination.

    To be honest I don’t know why my former colleague used eznaturecontrat.post_name inside the orderby I just copied and pasted it but if you want to know eznaturecontrat.post_name is juste a string for the type of job contract (like fixed-term contract or permanent contract).

    I tried without it and then by deleting all the orderby but the pagination still don’t show.

    • This reply was modified 3 years, 2 months ago by efaycal.
    • This reply was modified 3 years, 2 months ago by efaycal.
    Thread Starter efaycal

    (@efaycal)

    Hi,

    I’m not sure to understand how pagination work.
    Do I have to specify on my template with a magic tag where I want my pagination to show ?

    Thread Starter efaycal

    (@efaycal)

    I finally found my mistake.

    I used typographical quotes (from a copy/past) so I replaced them with regular quotes and it work now.

    Thank’s for your time

    Plugin Author Jory Hogeveen

    (@keraweb)

    Hi @efaycal

    Great to hear you’ve found it.
    Copy/paste from WP.org is indeed a bit tiresome as the quote characters are modified.

    Good luck with your project!

    Cheers, Jory

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to use pagination in archive’ is closed to new replies.