Skip Navigation

[Resuelto] output wp excerpt as an archive field and it shows a string of random letters

This support ticket is created hace 9 meses. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 14:00 – 18:00 13:00 – 18:00 -

Supporter timezone: America/Jamaica (GMT-05:00)

This topic contains 8 respuestas, has 2 mensajes.

Last updated by Shane hace 8 meses, 3 semanas.

Assigned support staff: Shane.

Autor
Mensajes
#2352489
2022-04-29_15-00-05.jpg

I have a wordpress archive that outputs several blog posts as a loop.

The view works but now that I've manually added the views block via the gutenburg block editor it is outputting a long string of random letters in the WordPress excerpt.

How do I remove this string?

hidden link

All the speeches have a linked document and I've now manually added a views block to each speech post to make sure the document shows up. I do want to able to conditional logic so that this only shows up when there is a document to show or remains blank, but I can't get this to work.

I couldn't get the previous support case to work and it has timed out for me being able to re-open it. https://toolset.com/forums/topic/using-custom-fields-with-divi-builder-single-view-post/

How do I remove the random strings at the end of the excerpt? Plus for the types generated archives, is there a way to remove the sidebar space so that it is full width?

Thanks
Cathie.

#2352547

Shane
Supporter

Languages: Inglés (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cathie,

Thank you for getting in touch.
Would you mind allowing me to have admin access to the website so that I can have a more detailed look at this for you ?

I've enabled the private fields for your next response.

I will like to see what exactly is causing the strings to be displayed.

Thanks,
Shane

#2354525

Shane
Supporter

Languages: Inglés (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cathie,

Thank you for the credentials.

I tried using them to log in, however they don't work.

Can you try them on your end and let me know if they work for you ?

Thanks,
Shane

#2354611

Strange but it does work for me.

I've reapplied the same password again and hopefully that fixes it for you but I can get into the dashboard with these details.

Thanks
Cathie

#2354677

Shane
Supporter

Languages: Inglés (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cathie,

Thank you for updating the login details.

The problem is caused by the view that you're using to pull the data. The [wpv-post-excerpt] shortcode will pull the content of the excerpt field. If the excerpt field isn't filled out then it will pull the post body.

However with this it will be pulling raw values from the database unformatted. Hence the view is not being rendered. You will notice that when you've added actual content to page you will see it displaying and if the view is removed then you will notice that the code won't be displaying on the frontend.

The way to fix this is to either add content to the excerpt field or add actual body content to the post body section.

Thanks,
Shane

#2355107

Okay, not ideal as I now need to figure out a way to do an archive template only for the speeches category and one for all the rest of the categories. Just so that speeches shows the full blog content and not the view string code.

Do you have any advice on how to make the archive content template fit full width and not with a space for a sidebar.

Thank you,
Cathie.

#2355125
2022-05-04_08-50-35.jpg

I need to find a different solution, I don't want to show the full body of the content as it then obviously shows everything and the 'view' showing the document. I just want to show the first 20 words for example.

Is there a way we can fix the excerpt so that it doesn't show the view string?

Thanks
Cathie.

#2355139

A way to fix the excerpt that does not mean manually writing the exerpt for every speech and any post in the future.

I'm trying to reduce the workload it takes to manage and create content on this site for the owners.

I'm already having to ask them to manually add the view the bottoms of any post with a document, as I can't yet figure out a way to conditionally add it to the bottom of posts that have a document attached. Which is my ultimate goal.

Thank you,
Cathie.

#2355401

Shane
Supporter

Languages: Inglés (English )

Timezone: America/Jamaica (GMT-05:00)

Hi Cathie,

The only way I can think of to fix this is to use the [wpv-post-body] shortcode instead of the [wpv-post-excerpt] shortcode.

This will load the post body with all its formatting.

Another workaround to this is that you can create a WYSIWYG custom field on your post type and add the view there. And in your archive template you can load the custom field that contains the view.

This should produce a similar and workable solution rather than adding the view directly to the post body.

Thanks,
Shane