Change tags url to search different site

There’s a filter in place specifically for tag links, can be found in source here. http://core.trac.wordpress.org/browser/tags/3.0.4/wp-includes/category-template.php#L780 It’s the first function you see on the above link, and it’s this line that provides a hookable filter. return apply_filters( ‘tag_link’, $taglink, $tag_id ); Here’s an example of hooking a function to that hook.. add_filter( ‘tag_link’, ‘new_tag_link’, 100 … Read more

return get_the_tag_list with whitespace removed

$tags = get_the_tags(); $tag_links = array(); foreach((array)$tags as $tag) $tag_links[] = ‘<a href=”‘.get_tag_link($tag->term_id).'” rel=”tag”>’.str_replace(‘ ‘, ”, $tag->name)).'</a>’; echo implode(‘, ‘, $tag_links);

Filter “Your latest posts”

<?php global $query_string; ?> <?php if (is_home()) query_posts($query_string . ‘order=DESC&orderby=modified’); ?> Try the above code in your index.php. Put it just above: <?php if (have_posts()) : while (have_posts()) : the_post(); ?>

conditional search

solution 1: this can be done by adding the drop down menu to the search form.eg cat_slct create a search template if its not exist in your theme. add an if statement at the top of the page and directly after get_header(); – if(isset($_POST[‘cat_slct’])){ //make the query using the name of the categoty you’v just … Read more

Where exactly does the edit_{taxonomy} hook fire?

Please have a read on how to work with filters and actions (I’m not repeating it here). The filter in a theme or plugin // inside /wp-includes/taxonomy.php on line 1586 $value = apply_filters(“edit_{$taxonomy}_{$field}”, $value, $term_id); // inside some theme file that runs before – best on functions.php during your themes bootstrap: function wpse40709_edit_tax_field( $value, $term_id … Read more

Add_filter rel=”prettyphoto” to WP3.4.1

Ok, after a few days trying various variations on the code I was originally using I still had no success. I took my theme right back to the bare bones, and tried the code again, I even tested the code of the TwentyEleven theme but still had no joy. I have an answer but not … Read more

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