ucsc / ucsc-2022

Official WordPress theme for UC Santa Cruz
6 stars 0 forks source link

Fix redundant content in query loop block #152

Closed kanarb closed 1 year ago

kanarb commented 2 years ago

In INC1372183 Melissa Weckerle asked if the current post could be excluded from the "You may also be interested in" block to avoid redundancy:

When adding new posts to the Baskin Engineering wordpress site, I noticed that the stories I'm inputing are appearing in the query loop block, creating redundancy. Is there any way to exclude the current post from the query loop? Attached to this ticket is a screenshot taken from the "Baskin Engineering welcomes new faculty members" post. You'll see that that same story is showing up in the query loop. Screen Shot 2022-10-24 at 4 36 22 PM

kanarb commented 2 years ago

Checking to see if any progress has been made on this. I'd like to update the ticket.

Herm71 commented 2 years ago

I'm not able to recreate this. I'm not able to find this page on Engineering in order to see about replicating it.

kanarb commented 2 years ago

I added your comment to the ticket and asked for an example URL.

kanarb commented 1 year ago

Hi Jason --

Melissa provided some example URLs:

https://engineering.wordpress.ucsc.edu/news/expanding-the-number-of-be-faculty/

https://engineering.wordpress.ucsc.edu/news/connecting-ucsc-students-with-industry/

https://engineering.wordpress.ucsc.edu/news/tim-175-provides-value-augments-experiential-learning/

kanarb commented 1 year ago

Becca added some more info on this:

It is to be noted that each time a new story is published the query loop will change.

The problem is the latest news story showing up in query loop as the an additional news "You May Also Be Interested In". For example this latest post : https://engineering.wordpress.ucsc.edu/news/inaugural-mep-tech4good-fellow/ Shows the same story in the query loop.

Note: depending on when this ticket is looked at the current example of URLS may be out of date.

Herm71 commented 1 year ago

Hi @kanarb, I've been looking into this and I've discussed it with @knice. This functionality is not built into WordPress Core Query Block or Recent Posts Block at this time. I reviewed the example pages Becca and Melissa provided; they're all basically the same. I rebuilt one of them in my test site on the dev network to explore some workarounds but haven't come up with an elegant solution. There are, however, third party blocks/plugins that provide it. In the pre-Block Theme era, we would do this with a custom query using PHP but the Block analogs don't yet provide this functionality.

kanarb commented 1 year ago

Is the idea that this is not going to be addressed in the near term due to technical limitations? If so, I'll put that info in the ticket and close it.

Herm71 commented 1 year ago

That is correct.

kanarb commented 1 year ago

I have closed INC1372183. I don't know if you want to close this issue or keep it open so you remember to look into it in the future.