[Resolved] Unknown code appearing on posts

Home Forums Support [Resolved] Unknown code appearing on posts

Home Forums Support Unknown code appearing on posts

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #974262
    Dami

    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?

    #974270
    David
    Staff
    Customer Support

    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:

    https://docs.generatepress.com/article/adding-php/

    #974310
    Dami

    Great that worked!

    Thanks

    #974311
    Dami

    Can I ask another Dispatch related question here or should I open a new thread?

    #974352
    David
    Staff
    Customer Support

    A new topic will make it easier for you ( and others ) to find the issue if need be in the future 🙂

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.