custom_post_type with umlaut in name

i now changed the navigation function to check for the url, since this one was right in all cases (i do have some other custom_post_types, that worked fine and still do). i just needed to strip the slashes from the url: add_filter(‘nav_menu_css_class’, ‘current_type_nav_class’, 10, 2 ); function current_type_nav_class($classes, $item) { $post_type = get_post_type(); if ($item->post_name … Read more

How to accomplish a child page navigation?

I’m outlining a solution for you, it uses get_children to determine if there are any, then conditionally sets up the post id $p_id for the child_of parameter, so that the list of child pages from a certain parent always can be shown, by making use of wp_list_pages(). Code: function wpse125273_child_page_nav() { global $post; $args = … Read more

Load Pages Menu in single.php

Yes you can. <?php $args = array( ‘theme_location’ => ‘primary’, //change this value with coresponding menu area ‘menu_id’ => ‘main-menu’, //change this value with wanted menu ); wp_nav_menu($args); ?> menu_id is the name of menu created in WP admin>Menus. I create menu with name “Main menu” so I put main-menu there. That menu is connected … Read more

Add html word before category

If you want to add “Tuppersex” text before each category name, you can do it by jquery jQuery(document).ready(function(){ var catList = jQuery(‘.cat_col li a’); catList.each(function(key, value){ var data = jQuery(this).text(); data=”Tuppersex “+data; jQuery(this).text(data); }); }); Code: http://jsbin.com/AJuJeQi/1/edit?html,js,output

WordPress Form To Email.php and Theme

You need to include the wordpress config file: require $_SERVER[‘DOCUMENT_ROOT’].’/wp-config.php’; OR use a page template if your form handler is in your theme. Take a look at using page template’s in wordpress: http://codex.wordpress.org/Page_Templates

How to remove feeds from WordPress totally?

First step: remove the feed links from the section of your site. <?php add_action( ‘wp_head’, ‘wpse33072_wp_head’, 1 ); /** * Remove feed links from wp_head */ function wpse33072_wp_head() { remove_action( ‘wp_head’, ‘feed_links’, 2 ); remove_action( ‘wp_head’, ‘feed_links_extra’, 3 ); } Next up, let’s remove the feed endpoints from WP. Hook into init, globalize $wp_rewrite then … Read more