Page Attachment Permalink Structure based on Menu Order?

I’ve been on a quest for the past couple of days reading up on Rewrite in WordPress but still can’t seem to figure out how to accomplish this. When using pretty links in WordPress, media attached to a page forms a URL like: http://www.domain.com/page_name/attachment_name/ http://www.domain.com/page_name/page_name/attachment_name/ http://www.domain.com/page_name/page_name/…/attachment_name/ What I would like to do is create a … Read more

previous next with custom-post-type by order attribute

I have a custom-post-type called ‘artists’. I list them by the order attribute (menu_order). $args = array( ‘post_status’ => ‘publish’, ‘post_type’ => array(‘artists), ‘orderby’=> array(‘menu_order’=>’ASC’ ), ); $wp_query = new WP_Query( $args ); When I use the_post_navigation() to get the previous and next links, it takes the date as the order instead of the menu_order. … Read more

Change default ordering of taxonomy terms – pre_get_terms

I wanted to change the default taxonomy terms order by its ‘term_order’ value instead of ‘name’ in admin side. So I tried something like below. But it doesn’t work and php memory exhaust. function uc_order_term( $wp_query ) { $wp_query->query( array( ‘taxonomy’ => ‘category’, ‘orderby’ => ‘term_order’, ‘order’ => ‘ASC’ ) ); } add_action( ‘pre_get_terms’, ‘uc_order_term’); … Read more

New page does not get a menu_order

The problem is that the order of the home page is not correct anymore. The new items are not in the same order as the menu, even though this is active: ‘orderby’ => ‘menu_order’, ‘order’ => ‘asc’ In the database I can see that every new page, type=project, used to have a menu_order assigned but … Read more

Adding a menu item in the admin bar

I would like to add a new menu item in the admin bar. So far, I have done the following: function add_book_menu_item ($wp_admin_bar) { $args = array ( ‘id’ => ‘book’, ‘title’ => ‘Book’, ‘href’ => ‘http://example.com/’, ‘parent’ => ‘new-content’ ); $wp_admin_bar->add_node( $args ); } add_action(‘admin_bar_menu’, ‘add_book_menu_item’); This is creating the Book menu item underneath … Read more

Reorder custom submenu item

In the Settings menu, I have the following menu items listed: Settings — General — Writing — Reading — Discussion — Media — Permalinks — Blogging I’d like to the Blogging (options-general.php?page=blogging) reordered underneath General instead of being at the bottom. This was added with the add_options_page() function. From doing some research, this is what … Read more