Archived topic
Unknown code appearing on posts
4 replies · Started by Dami on August 2, 2019
I've just installed the Dispatch site from the site library, now I have the following code appearing at the bottom of my posts - http://prntscr.com/onltqa
1, 'include' => $prevPost->ID ); $prevPost = get_posts($args); foreach ($prevPost as $post) { setup_postdata($post); ?>
PREVIOUS
1, 'include' => $nextPost->ID ); $nextPost = get_posts($args); foreach ($nextPost as $post) { setup_postdata($post); ?>
How do I get rid of it?
Hi there,
Dispatch uses PHP set in a Hook Element to display the Custom Post Navigation.
The code being displayed because your site is disallowing file editing. To get round that add the PHP Snippet provided at the bottom of this article:
https://docs.generatepress.com/article/generate_hooks_execute_php/
Adding PHP:
Great that worked!
Thanks
Can I ask another Dispatch related question here or should I open a new thread?
A new topic will make it easier for you ( and others ) to find the issue if need be in the future :)