Forum Replies Created

Viewing 15 posts - 1 through 15 (of 71 total)
  • Author
    Posts
  • in reply to: Metaboxes just not showing up #9561
    cosmocanuck
    Participant

    Hmm… I should probably retract this question.

    Further exploration has shown that custom fields don’t show up even in regular posts… and even if I create them using alternate means than Piklist (like a custom-field plugin). And another Divi site I built has Piklist-created custom fields that are working just fine.

    I suspect another plugin is conflicting, or another issue unrelated to Piklist. Sorry! Don’t spend any time on this one for now, anyone! 8^)

    in reply to: Metaboxes just not showing up #9560
    cosmocanuck
    Participant

    I realized I should mention, that I’m building this in Divi – which might be an issue (though I realize it shouldn’t be, and in fact I created custom fields in Divi before with Piklist, no problem…)

    cosmocanuck
    Participant

    It’s all sorted. Sorry to add further clutter to this discussion – I’d delete my posts but that’s seemingly not doable…

    Realized that specifying what fields are shown – or not – is part of defining the custom post type. Removed “editor” and it’s all sorted!

    Thanks for providing me a place to work out the answers to my own questions… 8^)

    Adam

    cosmocanuck
    Participant

    Sorry Steve, I erred – changing the type to “textarea” just made MY custom field not display at all. Sorry to inadvertently hijack this thread as my problem is probably unrelated!

    Alas I can’t reference your original link (https://piklist.com/user-guide/tutorials/replacing-wordpress-post-editor/) as it’s no longer at that URL… but as I say, when I use the provided code, it just adds a field but doesn’t remove the default one.

    This is a custom post type, does that affect things?

    Anyway, thanks for whatever help you can offer!

    Adam

    cosmocanuck
    Participant

    Hi Steve! There’s info in your reply here that I think needs to be included on this page:

    https://docs.piklist.com/fields/types/editor/

    I wanted to replace the default editor field with my own (mainly just so I could reposition it amongst my other custom fields), but when I used the code in the above reference page, which it says will achieve this (the code block just under “Piklist can replace the default editor in WordPress by using code the following code.”), it still only added an additional editor field – the default one was still there.

    Only after I changed 'type' => 'editor', to 'type' => 'textarea', did the unwanted default editor field finally vanish. Is this just a code typo? Anyway, wanted to let you know!

    All the best,
    Adam

    in reply to: Add admin page: just not working #9005
    cosmocanuck
    Participant

    Aha! Of course. My bad. Thanks!

    in reply to: Checkbox weirdness #8868
    cosmocanuck
    Participant

    Thanks Steve – I’ll upgrade to 0.9.9.17!

    in reply to: Anything Piklist-specific to prevent this site hack? #8271
    cosmocanuck
    Participant

    Thanks Jason! I guess I’m usually installing WP via cPanel and plugins via the Dashboard, so rarely directly FTP anything to my WP directory – but I’ll make note of those permissions guidelines.

    And I was looking at Wordfence as well – I’ll check both your suggestion out for sure.

    Have a great day!

    in reply to: Anything Piklist-specific to prevent this site hack? #8268
    cosmocanuck
    Participant

    Thanks Jason!
    I suspected as much in terms of what likely happened, i.e. a non-specific attack that lucked out and found a vulnerable way in. I’ll certainly follow up on your suggestions. I have just a couple of questions:

    File permissions: I don’t normally touch them, how do I know if there’s anything I should change?

    Also, I see there are lots of security-oriented WP plugins out there that seem to do a lot of good things to maintain security – do you have any particular recommendations or have one you use regularly?

    Again, thanks for your reply and the helpful suggestions!

    Adam

    in reply to: Creating a CPT in a plugin – what am I doing wrong? #7554
    cosmocanuck
    Participant

    Glad to help the site be even better and more accurate!

    All the best!

    in reply to: Creating a CPT in a plugin – what am I doing wrong? #7552
    cosmocanuck
    Participant

    Aha. It works! Thanks!

    But y’know what….

    THAT COMMA IS IN THE DEMO CODE.

    argh

    Someone ought to fix that… ;^)

    Thank you!
    adam

    in reply to: Creating a CPT in a plugin – what am I doing wrong? #7547
    cosmocanuck
    Participant

    Continuing to troubleshoot, I tried simply pasting in the untouched sample code above. But now I get the following error when trying to activate it:

    Plugin could not be activated because it triggered a fatal error.
    Parse error: syntax error, unexpected ‘,’, expecting ‘)’ in /nfs/c01/h08/mnt/7211/domains/hons.ca/html/wordpress/wp-content/plugins/piklist-hons/piklist-hons.php on line 39

    Hmmmm? Here is my current contents of the php file (with line 39 indicated by a comment):

    <?php
    /*
    Plugin Name: HON'S Piklist 
    Description: Adds custom post types and other features using the Piklist plugin.
    Version: 1.0
    Author: Adam Abrams
    Author URI: http://www.adamabramsdesign.com
    Plugin Type: Piklist
    */
    
      add_filter('piklist_post_types', 'piklist_demo_post_types');
      function piklist_demo_post_types($post_types)
      {
        $post_types['piklist_demo'] = array(
          'labels' => piklist('post_type_labels', 'Piklist Demo')
          ,'title' => __('Enter a new Demo Title')
          ,'menu_icon' => piklist('url', 'piklist') . '/parts/img/piklist-menu-icon.svg'
          ,'page_icon' => piklist('url', 'piklist') . '/parts/img/piklist-page-icon-32.png'
          ,'supports' => array(
            'title'
            ,'post-formats'
          )
          ,'public' => true
          ,'admin_body_class' => array(
            'custom-body-class'
          )
          ,'has_archive' => true
          ,'rewrite' => array(
            'slug' => 'piklist-demo'
          )
          ,'capability_type' => 'post'
          ,'edit_columns' => array(
            'title' => __('Demo')
            ,'author' => __('Assigned to')
          )
          ,'hide_meta_box' => array(
            ,'author'   /* THIS IS LINE 39  */
          )
          ,'status' => array(
            'new' => array(
              'label' => 'New'
              ,'public' => false
            )
            ,'pending' => array(
              'label' => 'Pending Review'
              ,'public' => false
            )
            ,'demo' => array(
              'label' => 'Demo'
              ,'public' => true
              ,'exclude_from_search' => true
              ,'show_in_admin_all_list' => true
              ,'show_in_admin_status_list' => true
           )
            ,'lock' => array(
              'label' => 'Lock'
              ,'public' => true
            )
          )
        );
        return $post_types;
      }
    
    
    cosmocanuck
    Participant

    Fantastic – thanks. Works great!

    Going to hit the books a bit more on arrays. They still make my head hurt a bit. 8^)

    in reply to: Checking for value of a repeating field seems not to work #4335
    cosmocanuck
    Participant

    Thanks Steve, that looks like exactly what I need – now to work through it… slowly! 8^)

    in reply to: Checking for value of a repeating field seems not to work #4330
    cosmocanuck
    Participant

    0.9.4.28.

Viewing 15 posts - 1 through 15 (of 71 total)