435 reputation
631
bio website
location
age
visits member for 4 years, 7 months
seen Aug 25 at 12:50

Nov
11
asked Conditionally load CSS/JS/PHP in wp-admin if using a mobile device
Nov
8
comment Publish page by invoking submit via jQuery
The problem is that I only have #publish in the real example, #secondary-publish was just something I used in this demo for illustration purposes (so it wouldn't collide with wp original publish meta box). In the real example you actually push #publish and there's a check via ajax and then it's supposed to published, so #publish is gonna get pressed indefinitely. It's all there in the pastebin in my last comment.
Nov
8
comment Publish page by invoking submit via jQuery
Thanks for your reply (and your corrections). It works as it should standalone, but when I implent it in where it's gonna be used it produces a loop. Hm, do you have an idea what I could do? pastebin.com/RBZq842m
Nov
8
revised Publish page by invoking submit via jQuery
added 55 characters in body
Nov
8
asked Publish page by invoking submit via jQuery
Nov
5
comment Only allow new subpages to be created
Yes, that part is all fine, but what happens if there's less than 9 parent pages?
Nov
5
comment Only allow new subpages to be created
No, it's nothing like that, when I press submit it processes as it should but when the page refreshes I get the message: "Page updated" rather than "Page published. View page". So it's only saved as a draft, not actually published. Did you try the above code without any troubles? I'm running 3.3.2, could that be an issue in that case?
Nov
2
comment Only allow new subpages to be created
Oops, sorry, didn't know I could do that. However, still some problems after all, it seems however I do it, it will only save as draft not publish. I've tried on two different setups just to be sure. Ideas? wordpress.stackexchange.com/questions/71009/…
Oct
30
comment Only allow new subpages to be created
$args = array( 'post_type' => 'page', 'post_parent'=> 0 ); should be $args = array( 'post_type' => 'page', 'post_parent'=> 0, 'numberposts' => -1 ); That was the problem :)
Oct
12
comment Change top level menu item to point to custom submenu item
I'm not entirely sure how I can use this to make clicking "Livsmedel" behave like you just clicked "New Sortable Menu". I just want to replace the regular view where pages and posts are listed, with my custom page and have it behave like it would do normally with the submenu getting highlighted when top level menu item is clicked/active.
Oct
10
comment Change top level menu item to point to custom submenu item
That might be a way if there's no other way to do it. I tend to try to rely on jQuery as little as possible in situations like this.
Oct
9
revised Change top level menu item to point to custom submenu item
added 11 characters in body
Oct
9
accepted Compare string with post id in wpdb and do stuff when match is found
Oct
9
comment How to make certain page templates visible to admin only
So I'm left with manually fetching setting in the DB? Or what are my options?
Oct
9
asked How to make certain page templates visible to admin only
Oct
8
answered Compare string with post id in wpdb and do stuff when match is found
Oct
7
comment Compare string with post id in wpdb and do stuff when match is found
@MihaRekar It's a custom CPT sorter based on the plugin CMS Page Order. I tie in with the ajax functionality that saves the new order in that plugin. I just want to be able to set post meta based on certain conditions. Can you help?
Oct
7
accepted Use ajax response in PHP function
Oct
7
asked Compare string with post id in wpdb and do stuff when match is found
Oct
1
comment How to disable page delete
@BrianFegter Can't get this to work in WP 3.3.2. Did something change? I changed restricted_users and restricted_pages to correspond to my page and user.