396 reputation
422
bio website
location
age
visits member for 3 years, 7 months
seen yesterday

Nov
26
comment Sorting Woocommerce products with numeric titles
Thanks for your reply! I tried this: wordpress.org/support/topic/… but I didn't seem to work (The order didn't change when switching between asc/desc). What could be wrong?
Nov
17
comment TinyMCE Autoresize
@Hobo I know I would overwrite other plugins by doing as I initially wrote in the question, that was just for debugging purposes. As autoresize isn't part of TinyMCE for Wordpress it wouldn't work however I tried it. The plugin I wrote below does however work.
Nov
11
comment Conditionally load CSS/JS/PHP in wp-admin if using a mobile device
Thanks for your reply! That could've been a valid approach. Unfortunately I'm on 3.3.2 and cannot upgrade WP because the site is built with very many custom scripts that possibly would break if WP is upgraded.
Nov
11
comment Publish page by invoking submit via jQuery
Solved it by having a secondary button like my example and having the original publish button hidden. Thanks for your help!
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
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
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
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
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.
Sep
30
comment Only allow new subpages to be created
This script won't allow publishing of any page, sub page nor parent page. Ideas?
Sep
29
comment Change top level menu item to point to custom submenu item
@kaiser I elaborated now, still feels kind of fuzzy to me aswell. I'm not sure I've got the right approach.
Aug
8
comment Associating custom submenu item with post type of top level menu item
Solved the problem I was having, changed from edit_{$post_type}s to edit_pages and it all worked out.
Aug
7
comment Associating custom submenu item with post type of top level menu item
@JoshuaAbenazer No, I don't think so, but please elaborate if possible. I've updated my question to be (hopefully) more clear.
Jul
22
comment Sort wp_nav_menu() by menu order
Thanks for your comprehensive answer. I realize now, that the approach I had to this issue the opposite of what I should be looking for. I have implented a custom menu, similar to the one that you find in Apperance -> Menus. What I want to do is send the order created in this menu to wp_nav_menu so that is the order seen in the front end. Sorry for this. I put up a new question if you have any insight (wordpress.stackexchange.com/q/59279/2830) Thanks!