Site-wide tabs at WordPress website?

Depends on where you want it, but the first thing that comes to mind is to simply add it in either header.php or footer.php in your theme. This is especially simple if the content won’t change often – just add the code to your theme files. If it’s content you want to change often, then … Read more

Installing wordpress on subdirectory 2 levels down

I managed to resolve this myself. Apologies for wasting anyones time. The fix was simple. I just had to add the following piece of code to my .htaccess <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /jack/blog/ RewriteRule ^index\.php$ – [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /jack/blog/index.php [L] </IfModule> Save my permalinks and the problem … Read more

Programmatically add a Navigation menu and menu items

I might be misunderstanding you, but why not use wp_create_nav_menu()? E.g., this is what I do to create a custom BuddyPress menu when I detect BP as active: $menuname = $lblg_themename . ‘ BuddyPress Menu’; $bpmenulocation = ‘lblgbpmenu’; // Does the menu exist already? $menu_exists = wp_get_nav_menu_object( $menuname ); // If it doesn’t exist, let’s … Read more

the_posts_navigation is not working

This function uses get_the_posts_pagination() which uses the GLOBAL $wp_query to setup the paginate_links() function, so I believe that doesn’t work for get_posts. Try use the function paginate_links() by itself or the function posts_nav_link()

Category navigation template

WordPress Pagination You can use previous_posts_link and next_posts_link. <nav id=”post-pagination” class=”navigation” role=”navigation”> <div class=”nav-previous”> <?php next_posts_link( ‘← Older’, $the_query->max_num_pages ); ?> </div> <div class=”nav-next”> <?php previous_posts_link( ‘Newer →’ ); ?> </div> </nav> It’s not important but Next and Previous have the opposite classes (.nav-previous on next_posts_link() & .nav-next on previous_posts_link()) because: Because post queries are … Read more

Navigation template

I found the solution. I had to add this in functions.php : add_filter(‘navigation_markup_template’, ‘my_navigation_template’, 10, 2 ); function my_navigation_template( $template, $class ){ return ‘<footer> <nav id=”nav-below” class=”navigation” role=”navigation”>%3$s</nav> </footer>’; } Source : http://wp-kama.ru/function/_navigation_markup