How can I show some standard html code across any theme I install?

You want to create a new plugin for this. See: http://codex.wordpress.org/Plugin_API/Action_Reference/wp_head Create a new file in /wp-content/plugins/ called headerstuff.php (or whatever) Drop the following code in it: <?php function header_code() { $output .= “”; //code segment echo $output; } add_action(‘wp_head’, ‘header_code’); ?> Add your code between the quotation marks on the line starting with “$output”. … Read more

Custom post type name and assigning custom taxonomy

I’ve checked another option and asigned my custom taxonomy to custom post type using its name but without capitals and space. ‘postname’ works with original ‘Post Name’ So for custom post type register_post_type( ‘Post Name’, $args ); I can use register_taxonomy( ‘custom taxonomy’, array( ‘postname’ ), $args ); And it works.

Dynamic redirect

Already solved using this code inside functions.php: add_action(‘template_redirect’, function() { if (is_single() && get_post_type(get_queried_object_id()) == ‘sorteio’) wp_redirect(‘edicao/?id=’ . get_queried_object_id()); });

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