Forum Replies Created
-
AuthorPosts
-
Jorge
ParticipantHi Peter, sorry for the late reply.
I mean when the connection is shown in the frontend. Monitoring the server usage, when having the relationships queried, we get some spikes/high consumption. If we disable them, the high usage is mostly gone.
November 3, 2023 at 6:28 AM in reply to: ✅View from relationship, one side not displaying anything #43726Jorge
ParticipantI don't know why I missed that from the documentation.
Thanks, Peter! That did the trick.
Jorge
ParticipantThat's absolutely right Peter, I was just reading that doc, thank you.
Is there any way to call that group field and add it to the plugin page so it can be filled there?
Jorge
ParticipantAh! That explains a lot Peter, thank you.
Setting the User ID like that will display only the user that matches the ID of "15", is it possible to have the shortcode display it to the -current- logged-in user? Or do I need to set up a helper function to access it from there?
Jorge
ParticipantHi Long,
Yeah, I browsed the documentation and found that it's not possible. Is this a feature that might be developed in the future?
Having something similar to GravityKit's GravityInline functionality would be awesome!
August 17, 2022 at 9:35 AM in reply to: Report card for students, automatic calculation and teacher input #37536Jorge
ParticipantThat's great Long, thank you. I got the nested loop working properly.
The tricky part for me was setting the relationship 'from' because I wasn't sure where does that come from, but from the context of the queries made sense.{% set weigh_args = { post_type: 'weight', nopaging: true, relationship: {id: 'weight_grades', from: grade.ID} } %}Since I will be using fields from both loops across the entire view. I've got a question regarding best practices.
Is it better to get the arguments and "open" the For loop, then get the arguments and open the nested loop, do the content and stuff, then close both loops? Or open the main loop, and where the relationship fields are needed, open the nested loop?
Jorge
ParticipantI'm not sure if you mean your questions on the Forum. If you do, you can click on your Avatar or name (on the right sidebar, or everywhere), and it will display all the Threads you've started.
August 14, 2022 at 2:18 AM in reply to: Report card for students, automatic calculation and teacher input #37481Jorge
ParticipantThanks Long, yeah I moved everything to a top field.
I'm trying right now to achieve something but I feel I'm not grasping something (could it be a relationship?).
There are two CTPs: One for records/scores, the other for weighing. The idea is to do some operations between the two as follows: 'Homework score * Homework weigh = Homework final.'
However, if I do a query to create a for loop to display each entry of the Records, I do not know how to access the weighs.On a side note, would it be better to keep this (which I feel it's a bit complex) in a View or would it be better to move it to a PHP file?
Jorge
ParticipantGot that Long! Thanks a lot, it was quite easy to set that up knowing where to look. Thanks for the example.
I've set it up to show on the Archive Page of a specific custom taxonomy archive, and it does show the view properly (replacing the content between the header and footer as you pointed earlier), but it doesn't filter out the posts it shows all of them no matter if it matches the custom taxonomy or not. It doesn't really surprise me, since there's no actual reference/filter to it on the view itself, other than the display one.
If I were using the "regular" WP categories, I'd add to the arguments the category->ID and would be done, ending up like this:
{% set args = {post_type: 'documento', category: 39, posts_per_page: -1} %}But I'm not sure how do I add the custom taxonomy from Metabox to it? (I think the answer is right on my nose, but still not finding it).
Thank you for your help, I'm understanding quite better how to seam together all the metabox' parts!
Jorge
ParticipantThanks Long, that solves the "Title" part, which now looks like this:
<p>{{ post.post_title }}</p>and works great.I've got a File Advanced field on the post. On the documentation I couldn't find any reference on how to call those. I'm inserting it using the "Insert Field" button without any other change. Which I think it's not part of the post object, from what I understand is that I'd need to use the
rwmb_meta()helper, but I am not sure on how to use it there (and how to call the File Advanced in there). Is there any example I could use to get this going properly? (I'm starting to feel a bit over my head with the custom fields thing).Thanks!
Jorge
ParticipantSorry for the late reply, as you can see on my previous post, I've got exactly the same structure however this
<p>{{ post.post_title }}</p>returns empty. As well if I add the custom field (which is a File Advanced type). The shortcode, displays the whole html layout, but not the content from the query.<div class="doc-container"> {% set args = {post_type: 'documento', posts_per_page: -1} %} {% set posts = mb.get_posts( args ) %} {% for post in posts %} <p>This - {{ post.title }}</p> {% for item in post.descarga_archivo %} <a href="{{ item.url }}">{{ item.title }}</a> {% endfor %} {% endfor %} </div>So I'm not sure if I need to do the query on a different way, or if it's something wrong with the one I'm making.
Jorge
ParticipantHi Long, thank you the video explains way better the situation, it's exactly that. I understand that it is in fact working. So let me rephrase/clarify my question:
Is it possible to generate a metabox view that is used on a dynamic generated page (an archive page) to be displayed at only the post content area, replacing the post content?
In the mean time, I'm trying the shortcode route (which would render the archive page "useless", which is not necessarily a bad thing), using this thread as reference.
So, I set up the code like this, just to see if it works:
<div class="doc-container"> {% set args = {post_type: 'documento', posts_per_page: -1} %} {% set posts = mb.get_posts( args ) %} {% for post in posts %} <p>{{ post.title }}</p> {% endfor %} </div>The post is configured to be requested via query var, to be shown in REST, to be publicly queryable, it is not excluded from search and it's public.
Placed the shortcode on a regular page. And the shortcode does create the
div.doc-containerand creates 2 empty p tags (which is expected, since there are only 2 posts published. Am I missing something here?Jorge
ParticipantI've installed the plugin and did a custom taxonomy, so the archive for the category is working!
However, tinkering with the view for it, if I select to render for the whole page layout or the layout between header and footer, it works just fine, and loads the layout without any issue.But if I select to render only in the post content area with any of the three options it doesn't work.
The page displays the regular loop and it shows the metabox' view sanitized, no tags, classes, links, anything. Just plain text repeated after every item on the loop.
I'm not sure what could I be doing wrong here. :/
Jorge
ParticipantThanks Long,
Is there any "actual" difference/advantage on having a custom Taxonomy over the default WP one?
I'll toy around with the CPT permalink plugin, thanks for the link!
-
AuthorPosts