Forum Replies Created

Viewing 15 replies - 31 through 45 (of 46 total)
  • Plugin Author Tangible

    (@tangibleinc)

    Thank you for the issue description – the screenshot was very helpful.

    It was indeed a compatibility issue with PODS. This will be fixed in the next version release, hopefully soon.

    If you have any further questions or feedback, please feel free to join our discussion forum.

    Plugin Author Tangible

    (@tangibleinc)

    Hi Stanley,
    Sorry for the delay!

    This won’t work anymore with L&L, since the only shortcode it supports is [template]

    The new approach to using L&L in PHP templates is documented here in the From PHP section

    You could use the following to achieve the same result:

    <span class='date'>
      <?php echo tangible_template('<Field publish_date />'); ?>
    </span>

    To format dates in L&L, you can wrap them in the <Date> tag, documented here

    Hope that helps! Please visit our dicussion forum if you have any other questions!

    Plugin Author Tangible

    (@tangibleinc)

    Hi!
    This is definitely possible! I would approach it this way:

    <Loop field=archive_term><Set term_id><Field id /></Set></Loop>
    <Loop type=project taxonomy=project_type terms="{Get term_id}" taxonomy_2=featured terms_2=featured orderby=date order=desc>
      <div>
        <a href="{Field url}">
          <div class="fl-post-image">
            <Field image size="large" />
          </div>
          <div class="fl-post-text">
            <h2 style="margin-bottom: 0;"><a href="{Field url}"><Field title /></a></h2>
            <p><Field sub_head /></p>
          </div>
        </a>
      </div>
    </Loop>

    The rest of my response is just explanation, so you can just go ahead and copy-paste that code block and it should work 😀

    The Loop tag gets the archive context by default if you just write <Loop></Loop>, but as soon as you add other attributes like your taxonomy filtering that context breaks down. So your instinct to open a project loop with terms=current was correct, however that doesn’t seem to work in my testing. (If you try it on your end again let me know if it works!)

    Because the default Loop context on an archive is the posts in it, you need to open a separate loop to access the current term fields like title, ID and custom fields. You can use <Loop field=archive_term> on archives for this purpose. Inside my archive_term loop I saved the term ID as a variable to pass to the main loop using Set and Get

    The part you were getting wrong is that your nested loops are unnecessary, as you can use up to three taxonomy filters on a single Loop. You’ll find the taxonomy attributes for the post Loop documented here.

    Aside from that, nested Loops only inherit context if you tell them to, so your example could maybe have worked if you passed include="{Field id}" to the inside Loop (assuming the filter priorities work in the specific way we need them to, I haven’t actually tested it):

    <Loop type=project count=1 taxonomy=project_type terms=current orderby=date order=desc >
      <Loop type=project include="{Field id}" taxonomy=featured terms=featured>
      <div>
        <a href="{Field url}">
        <div class="fl-post-image">
          <Field image size="large" />
        </div>
        <div class="fl-post-text">
          <h2 style="margin-bottom: 0;"><a href="{Field url}"><Field title /></a></h2>
          <p><Field sub_head /></p>
        </div>
        </a>
      </div>
      </Loop>
    </Loop>

    Hope that helps!

    Please visit our discussion forum if you have any other questions!

    Plugin Author Tangible

    (@tangibleinc)

    The question of how long CCS will be maintained is a difficult one to answer because it’s going to depend on some external factors.

    Eliot Akira works at Tangible but CCS is still his personal project and updates will be happening on his own time and at his discretion.

    I suspect that CCS will be maintained for at least a year, but if ever a WordPress update would be very time consuming to maintain compatibility with he may not have the time or the inclination to fix things. Luckily WordPress is very good about maintaining backwards compatibility so that probably won’t be an issue, but we can’t be sure.

    I’ll ask Eliot to clarify his intentions there and we’ll make a post about it to keep everyone informed.

    Plugin Author Tangible

    (@tangibleinc)

    Our reply was held for moderation 🙁 check back in a bit

    Plugin Author Tangible

    (@tangibleinc)

    Hi! We haven’t built out WPML support yet, but in our own projects we’ve found workarounds for translation.

    The easiest to implement is creating an ACF options page with your strings, translating those and getting them where needed in your templates (with the side benefit of those strings becoming easily editable by you or your client from one place in the admin). This approach makes the most sense for stuff like “Read more” or “Posted on” strings you’ll be using across the site that benefit from being consistent.

    How to use values from ACF options pages =>

    Registering an options page with ACF =>

    You can also test the url for the ?lang query string with the Url tag if you’re formatting your translated links that way, but that’s a bit less reliable.

    <Set name=dateFormat>
      <If check="{Url query=lang}" value=en>
        en
      <Else if check="{Url query=lang}" value=fr />
        fr
      <Else/>
        <Setting wpml-previous-default-language />
      </If>
    </Set>

    <Setting wpml-previous-default-language /> gets one of the very few fields that WPML saves in the wp-options table. Its name is a bit deceptive as it’s the current default language. I sometimes use the Url test approach to pass a language code to translate my dates:

    <Format date="j F, Y" locale="{Get dateFormat}><Field publish_date /></Format>

    Hope that helps!

    Please visit our dicussion forum if you have any other questions!

    Plugin Author Tangible

    (@tangibleinc)

    This plugin seems to do a good job of finding your CCS!

    Plugin Author Tangible

    (@tangibleinc)

    Oddly, the Loop works when you directly pass it IDs, but not any other way:

    <ol>
      <Loop type=hp_listing include=123>
        <li>
          <a href="{Field url}"><Field title /></a>
        </li> 
      </Loop>
    </ol>

    This appears to be something non-standard about how Hivepress queries its listings. We’ll need to take a closer look at this and see if it’s something we can resolve (I’m hopeful, seeing as it appears to work with CCS)

    Plugin Author Tangible

    (@tangibleinc)

    Yes they can! For example:

    <Loop type=taxonomy_term taxonomy=category>
      <If loop type=post taxonomy=category terms="{Field id}">
        <h2><Field title /></h2>
        <ul>
          <Loop type=post taxonomy=category terms="{Field id}">
            <li><a href="{Field url}"><Field title /></a></li>
          </Loop>
        </ul>
      </If>
    </Loop>

    In this example, the outer Loop is listing categories with their titles as headings. The If statement is testing whether a post loop exists for the taxonomy term, and the inner Loop is getting those posts as a list of linked titles. In the example the Loop context is being passed to inner loops via terms="{Field id}".

    Does that answer your question?

    Plugin Author Tangible

    (@tangibleinc)

    Hi! You’ll have to open a user loop like so:

    <Loop type=user id=current>
      <Field first_name />
      <Field avatar size=60 />
      <Field email />
    </Loop>

    You’ll be able to get all user fields and custom user fields this way 🙂

    Plugin Author Tangible

    (@tangibleinc)

    I’m glad you figured this one out!

    This reminds me of fetching the current logged-in user’s information. What in CCS was…

    [user avatar]

    …in L&L it becomes:

    <Loop type=user id=current><Field avatar /></Loop>

    There’s been some internal debate about this syntax and whether we should provide some shortcuts.
    I’ll let Eliot explain the reasoning behind it and future plans there in more detail when he has a moment.

    Although L&L has been in the repository for a few months, it’s mostly been used internally at Tangible and hasn’t been publicized in any way until this past week.
    We’ve got a lot of content and improvements in the pipeline that we were hoping to get out before making a public announcement, but since we jumped the gun a little it’s a good time to let us know which specific examples you’d like to see first so we can prioritize what you’re most interested in seeing!

    Plugin Author Tangible

    (@tangibleinc)

    Hi! To test whether an ACF relationship field has a value you can use the following:

    <If loop acf_relationship=field_name>conditionally display this</If>
    You can test whether any loop returns something this way: by pasting the whole Loop with its attributes into an if tag and removing the capitalization on “Loop”

    If you’re manually using the ACF True / False field to hide or show your relationships, L&L supports that. The True / False field saves 1 for true or 0 for false, and that’s what it outputs when you get it with the Field tag in L&L (<Field field_name />) so you can test its value like this:
    <If field=field_name value=1>This is true<Else />This is false</If>

    Plugin Author Tangible

    (@tangibleinc)

    Hello! Yes, it is possible to loop direct children of the current post, or query the parent post.

    The post loop has a field called parent, which can used like this:

    <Loop field=parent>
      <Field title />
    </Loop>
    

    Similarly, there’s a field called children.

    
    <ul>
      <Loop field=children>
        <li><Field title /></li>
      </Loop>
    </ul>
    

    These and other fields are documented here: https://loop.tangible.one/tags/loop/post

    Please visit our dicussion forum if you have any questions.

    • This reply was modified 4 years, 6 months ago by Tangible.
    Plugin Author Tangible

    (@tangibleinc)

    Hello! Thank you for the issue report. This has been solved in a recent version, so variables used in a paginated loop should be passed when loading new pages.

    Please visit our discussion forum if you have any questions.

    • This reply was modified 4 years, 6 months ago by Tangible.
    Plugin Author Tangible

    (@tangibleinc)

    This question was answered on our forum: https://discourse.tangible.one/t/how-to-get-image-srcset/257

Viewing 15 replies - 31 through 45 (of 46 total)