Viewing 3 reply threads
  • Author
    Posts
    • #10613
      jdhunter
      Participant

      Thanks for the reply Steve, but the situation is not resolved. I installed it on a crappy server and it worked, that is not where I am going to be running my app. The server where I will be running the app still does not work. It is not generating any errors, no suspicious entries in any logs, noting. It just doesn’t work. I am happy to provide you with a login to check it out if that would help.

    • #10614
      jdhunter
      Participant

      So, the issue that is causing your settings page to not work is not related to my WordPress version (5.4), it’s the PHP version, it does not work with 7.4, I stepped it back to 7.3 and the settings page works now. You may have already noted somewhere that it does not work with 7.4, I might have missed it.

      That fixed the issue of your settings page not working, but I am still having some basic issues getting your example code to work. I am able to create a menu item that does display a page, by placing the following code in my plugin code:

      add_filter(‘piklist_admin_pages’, ‘my_expo_pages’);

      function my_expo_pages($pages) {

      $pages[] = array(
      ‘page_title’ => ‘Expo Admin Area’
      ,’menu_title’ => ‘Expo’
      ,’menu_slug’ => ‘expo_admin_area’
      ,’capability’ => ‘manage_options’
      );

      return $pages;
      }

      but when I try and add some html to that page, it does not display. Nothing I do within the /parts folders seem to work. Just the items I place in my plugin folder. In an earlier test, I was able to create a CPT, but that code was in my plugin file, not the folder structure. Here is some very simple code in the /parts/admin-pages folder that does not work:

      <?php
      /*
      Page: expo_admin_area
      */
      ?>

      <p>
      This is a simple test
      </p>

      So what am I doing wrong? This looks stupid simple to not be working. I did add the Classic Editor into my site as mentioned in another persons issue, did not make a difference.

      This plugin looks awesome and I have so much I want to do with it, but I can’t seem to get out of the starting blocks.

      Thanks,
      Jim

    • #10615
      jdhunter
      Participant

      So, by copying from the tutorials, nothing was working, I watched your 2015 WC NYC video and you mentioned that one could download the code so I did. I put that code directly on the good server, where I want to run my new app, and your demo code ran fine. So I then copied the headers from there and used them in my plugin and was able to get my plugin to work. I don’t have time to figure out why the headers on your tutorial pages were not working for me. All I know is that I am actually doing things right now. I have a question about workflows, but I ‘ll ask that in a new thread.

    • #10618
      Steve
      Keymaster

      @jdhunter– Glad things are working now. Is this the tutorial you were having issues with? https://docs.piklist.com/tutorials/admin-pages/creating-a-simple-admin-page/

Viewing 3 reply threads
  • You must be logged in to reply to this topic.