Timeline for Custom metabox fields not saving when limited to a certain CPT
Current License: CC BY-SA 3.0
18 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 3, 2015 at 15:43 | vote | accept | Andrew Vesey | ||
Jul 3, 2015 at 15:43 | answer | added | Andrew Vesey | timeline score: 0 | |
Jul 3, 2015 at 15:41 | comment | added | Andrew Vesey | sorry, first time using the site. Will do now. | |
Jul 3, 2015 at 15:39 | history | edited | Andrew Vesey | CC BY-SA 3.0 |
[Edit removed during grace period]
|
Jul 3, 2015 at 15:35 | comment | added | s_ha_dum | Post your solution as a proper answer please. | |
Jul 3, 2015 at 15:34 | comment | added | Andrew Vesey | SOLVED IT! There was another Post Type check I needed in there. Adding now and marking as solved. Thanks for taking the time to help out @s_ha_dum | |
Jul 3, 2015 at 14:59 | comment | added | s_ha_dum | In principle, you should be able to build a constructor class, though I question the utility. Something about that class could break things though. | |
Jul 3, 2015 at 14:44 | comment | added | Andrew Vesey | Yes, it's a class the original coder setup for CPTs - then each CPT's individual file extends the class with it's own options for custom metaboxes and columns, etc. I'm wondering if this may be the reason I can't limit it to a specific CPT properly. Perhaps I need to created each CPT individually instead? | |
Jul 2, 2015 at 14:16 | comment | added | s_ha_dum |
Is that "save" code part of a class? $this->slug is going to cause problems otherwise.
|
|
Jun 29, 2015 at 18:26 | history | edited | Andrew Vesey | CC BY-SA 3.0 |
added 2495 characters in body
|
Jun 29, 2015 at 17:42 | comment | added | Andrew Vesey | You're the expert. It just didn't make sense as it works fine without any condition and even when limiting to specific pages, just not CTP - and it's not the save code that has the condition on it. But hey, I'm just a noobie really and have inherited this code so not 100% sure of all of it. Thanks for the extended clarification. Will edit the question with more code. | |
Jun 29, 2015 at 14:14 | comment | added | s_ha_dum | Yes... "the code works perfectly except when it doesn't work in the case that I am talking about". I'm sure you are right. Not relevant. Obviously, something you have done is wrong and the minimal code you have posted is not adequate for finding the problem. If you are not going to provide additional information, good luck to you. I don't have time to burn begging you. | |
Jun 29, 2015 at 11:41 | comment | added | Andrew Vesey | @s_ha_dum - I didn't think the code for saving the data would be relevant in this case - It works perfectly. It's only when I limit the queries for the metabox options to a specific CPT that I get an issue. | |
Jun 29, 2015 at 10:02 | comment | added | s_ha_dum | "The metabox fields don't save when the page is updated!" -- and the code you haven't posted? The code responsible for saving the data... | |
S Jun 29, 2015 at 7:33 | history | suggested | Gabriel | CC BY-SA 3.0 |
Improve code formatting/indentation, remove noise, misc
|
Jun 29, 2015 at 6:52 | review | Suggested edits | |||
S Jun 29, 2015 at 7:33 | |||||
Jun 29, 2015 at 6:17 | review | First posts | |||
Jun 29, 2015 at 6:52 | |||||
Jun 29, 2015 at 6:16 | history | asked | Andrew Vesey | CC BY-SA 3.0 |