Get $curauth level

toscho is correct. User levels have been deprecated for a long time now. However, the following will get you the available information about the author of the posts on an author archive page. $author = get_queried_object(); var_dump($author); In that dump you should see everything you need, but use the role not the user level– look … Read more

paging is not working properly on news archives page [duplicate]

Using your custom get_posts() you are ignoring the $paged var. In this way, you’ll see always posts from the first page. According the Codex Page if you would like to alter the main query before it is executed, you can hook into it using pre_get_posts. function my_post_queries( $query ) { if (!is_admin() && $query->is_main_query()){ $query->set(‘posts_per_page’, … Read more

Ajax navigation and scripts loaded only on certain pages

If the plugins are nice about it and register all of their scripts upfront, and then just enqueue them as needed, you should be able to enqueue all of them to load all the time. Find out the handles they were registered with and enqueue them. add_action(‘wp_enqueue_script’, function() { wp_enqueue_script(‘example-handle’); wp_enqueue_script(‘another-example-handle’); }, 20); However, some … Read more

How to output the menue structured for tabbed navigation?

What a pitty that nobody responded. I had a hard way checking the walker class first before I found out that it’ll be much easier with wp_get_nav_menu_items() This is what I came up with. Not perfect but it works (only two levels which is enought for my page). $menu_name=”primary”; if ( ( $locations = get_nav_menu_locations() … Read more