• Hi, I have loops like the following on several pages. They were all working, but now only three are working, and we haven’t changed anything.

    Here is the working code:
    [is logout] [loop type=”post” taxonomy=category term=”latest-news,front-page-news” relation=and taxonomy_2=”roles” term_2=”general-public” count=”5″][field title-link][br][/loop][/is]

    [is role=”subscriber”][loop type=”post” taxonomy=category term=”latest-news,front-page-news” relation=and taxonomy_2=”roles” term_2=”general-public,subscriber” count=”5″][field title-link][br][/loop][/is]

    [is role=”contributor”][loop type=”post” taxonomy=category term=”latest-news,front-page-news” relation=and taxonomy_2=”roles” term_2=”general-public,subscriber,steering-committee” count=”5″][field title-link][br][/loop][/is]

    [is role=”editor,author,administrator”][loop type=”post” taxonomy=category term=”latest-news,front-page-news” relation=and taxonomy_2=”roles” term_2=”general-public,subscriber,steering-committee,mders-staff” count=”5″][field title-link][br][/loop][/is]

    And the non-working code:
    [is logout] [loop type=”post” taxonomy=category term==”latest-news” relation=and taxonomy_2=”roles” term_2=”general-public”][field image image_class=”alignleft”][br][field title-link] [field excerpt][br][/loop][/is]

    [is role=”subscriber”][loop type=”post” taxonomy=category term=”latest-news” relation=and taxonomy_2=”roles” term_2=”general-public,subscriber”][field image image_class=”alignleft”][br][field title-link] [field excerpt][br][/loop][/is]

    [is role=”contributor”][loop type=”post” taxonomy=category term=”latest-news” relation=and taxonomy_2=”roles” term_2=”general-public,subscriber,steering-committee”][field image image_class=”alignleft”][br][field title-link] [field excerpt][br][/loop][/is]

    [is role=”editor,author,administrator”][loop type=”post” taxonomy=category term=”latest-news” relation=and taxonomy_2=”roles” term_2=”general-public,subscriber,steering-committee,mders-staff”][field image image_class=”alignleft”][br][field title-link] [field excerpt][br][/loop][/is][br]

    Once I got this working, I just basically cut and paste, and modified the category term. I’ve checked my categories and I’ve used them correctly. I am at a loss. I hope you can help me.

    Thank you!
    Gail

    https://www.ads-software.com/plugins/custom-content-shortcode/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Thread Starter gailwingate1

    (@gailwingate1)

    Sorry, the code that I showed you that is working is for a widget not a page, so it’s slightly different. Here is the code on another page this IS working.

    <h3><span style=”color: #d21241;”>TRAINING</span></h3>
    [is logout] [loop type=”post” taxonomy=category term=”training,classroom-training” relation=and taxonomy_2=”roles” term_2=”general-public”][field image image_class=”alignleft”][br][field title-link] [field excerpt][br][/loop][/is]

    [is role=”subscriber”][loop type=”post” taxonomy=category term=”training,classroom-training” relation=and taxonomy_2=”roles” term_2=”general-public,subscriber”][field image image_class=”alignleft”][br][field title-link] [field excerpt][br][/loop][/is]

    [is role=”contributor”][loop type=”post” taxonomy=category term=”training,classroom-training” relation=and taxonomy_2=”roles” term_2=”general-public,subscriber,steering-committee”][field image image_class=”alignleft”][br][field title-link] [field excerpt][br][/loop][/is]

    [is role=”editor,author,administrator”][loop type=”post” taxonomy=category term=”training,classroom-training” relation=and taxonomy_2=”roles” term_2=”general-public,subscriber,steering-committee,mders-staff”][field image image_class=”alignleft”][br][field title-link] [field excerpt][br][/loop][/is][br]

    Plugin Author Eliot Akira

    (@miyarakira)

    I notice that some of the quotes are straight/normal, and other quotes are “fancy” or curly.

    Here’s a normal quote: “
    And a curly one: ”

    Hard to tell the difference, but the shortcode can only handle normal quotes. So, my guess is that the visual editor must have transformed some of them to cause the issue.

    Plugin Author Eliot Akira

    (@miyarakira)

    Hm, there might be another reason, since there are curly quotes in the working code also.

    In the non-working block of code, is it possible to narrow down exactly which line is having a problem? I read through it several times, but I don’t see what could be going wrong. And when you say it’s not working, is it just not displaying anything, or displaying something for incorrect condition?

    Hi Loop is not working after update to 2.40

    [loop type="page" field="title" start="MD" orderby="title" order="ASC"]
        [field title]
        [field date]
        [field excerpt]
     [/loop]

    I get the title of the page and nothing else.

    This loop works

    [loop type="page" parent="md2" orderby="title" order="ASC"]
    [field title]  [field excerpt]
    
     [field slug]  [field date]
    [/loop]

    Looks like code dealing with start broke

    Plugin Author Eliot Akira

    (@miyarakira)

    Hi Oz22, please start another topic thread as it seems to be a different issue. I can help you further there.

    I figured since the comments are here an do not know how to move the messages I would answer here

    2.4.1 fixed the problem.

    New topic created

    https://www.ads-software.com/support/topic/loops-using-start-not-working-in-240-fixed-in-241?replies=3#post-7170871

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Code was working and now it's not…?’ is closed to new replies.