• Resolved miketurco

    (@miketurco)


    Hi,

    I’ve been working really hard at adding a couple of new post status headings to my site. I thought it might be possible to clip some code from your plugin, but what I did crashed my site. (So I just undid the change, no biggie.

    Below is exactly what I pasted into functions.php (in my child theme):

    function aps_register_archive_post_status() {
    // and all the code in between…
    }
    add_action( ‘init’, ‘aps_register_archive_post_status’ );

    Could you please advise? I’d really appreciate it. (Since the Edit Flow plugin went down, it’s almost impossible to find a working solution to add custom statuses.)

    https://ww.wp.xz.cn/plugins/archived-post-status/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Frankie Jarrett

    (@fjarrett)

    Hi Mike,

    Did you first deactivate my plugin before adding this code to your theme?

    If not, then that’s why your site is broken. You can’t use the same function name somewhere else. That’s why all my functions are prefixed with aps_.

    When adding hooks, or any custom PHP to your site, be sure to turn on WP_DEBUG so you can track down where fatal errors are coming from.

    https://codex.ww.wp.xz.cn/WP_DEBUG

    Thread Starter miketurco

    (@miketurco)

    I didn’t activate the plugin, actually. I just grabbed the zip file and copied a piece of your code. (Thank you for providing that, by the way!)

    I suspect the debug thing will be over my head, but I’ll give it a shot. Thank you for your FAST response.

    Plugin Author Frankie Jarrett

    (@fjarrett)

    You’re welcome!

    Copy pasta is dangerous without WP_DEBUG turned on 🙂

    I’m sure you will figure it out, there are several walkthrough videos on YouTube as well. Only takes a few minutes to find and change.

    Just remember to turn it back OFF when you are done making changes so users don’t see errors that may pop up in the future.

    Good luck!

    Thread Starter miketurco

    (@miketurco)

    Thank you! I’ll keep at it 🙂

    Plugin Author Frankie Jarrett

    (@fjarrett)

    Would really appreciate a 5 star review if you find the code in the plugin helpful for your project! 🙂 Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Addition of post status’ is closed to new replies.