Remove international characters from slug – Almost done – Bit help

Following on from my comment on your question. The solution would be to hook your own filter onto the same functions sanitize_title_with_dashes does, in this case i think you’re just aiming to hook onto sanitize_title as is done with sanitize_title_with_dashes. Simply ensure you hook on after sanitize_title_with_dashes, which is hooked on at the default priority … Read more

add slug of child(ren) to li using wp_list_pages

OK, I almost got it now… I extended the Walker_Page Class: class Walker_Child_Classes extends Walker_page { function start_el(&$output, $page, $depth, $args, $current_page) { if ( $depth ) $indent = str_repeat(“\t”, $depth); else $indent=””; extract($args, EXTR_SKIP); $output .= $indent . ‘<li class=”‘ . apply_filters( ‘the_title’, $page->post_name, $page->ID ) . ‘”><a href=”‘ . get_page_link($page->ID) . ‘” title=”‘ … Read more

Select query with two and two related taxonomies

I believe you can just use the WP_Query method to query the database with a tax_query like so: $my_query_args = array( ‘post_type’ => ‘shows’, ‘tax_query’ => array( ‘relation’ => ‘AND’, array( ‘taxonomy’ => ‘location’, ‘field’ => ‘slug’, ‘terms’ => ‘california’ ), array( ‘taxonomy’ => ‘genre’, ‘field’ => ‘slug’, ‘terms’ => ‘comedy’ ) ) ); $my_query … Read more

Can’t use a specific custom URL (slug)?

The easiest explanation I can think of is that you have a file or directory in your site’s directory named “pitch” (such as public_html/pitch or public_html/my-domain/pitch). This can easily be caused by creating the folder for some reason and forgetting about it later or setting up a subdomain such as pitch.my-domain.com which typically will create … Read more

Echo Category Nicename

*get_the_category();* is designed to return multiple categories. You have to provide index for deciding which categories’ nicename you want to echo. Something like below, $category = get_the_category(); echo ‘<img src=”‘.get_bloginfo(‘template_directory’).’/images/categories/’.$category[0]->category_nicename.’.png”>’;

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)