How to deal with WordPress bug: can’t use wrapped and unwrapped shortcode on same post

According to a new post by mdawaffe on the trac ticket referenced in this question: [test id=”1″/] first self closed, now [test id=”2″]with content[/test] [foo attr/]bar[foo attr/]bar[/foo] [test/] [test]foobar[/test] [test id=”1″][/test] All these cases now work. Apart from unit tests, this ticket can be closed. I am assuming this means it will not be an … Read more

Why isn’t my rewrite rule working when there is no second parameter?

Your regular expression is requiring the last slash be present which it will not be by default. So the path tides/mylocation/ is shortened to tides/mylocation and then tested. Instead, wrap the last part in an optional group using the ? and update the match number. add_rewrite_rule(‘tides/([^/]+)(/([^/]+))?’, ‘index.php?page_id=4348&location=$matches[1]&month=$matches[3]’, ‘top’);

Adding elements to wp_list_pages (within , but before )

If I Understood your question right, instead of wp_list_pages, you can use a custom query using get_pages e.g. $args = array( ‘sort_order’ => ‘ASC’, ‘sort_column’ => ‘menu_order’, ‘hierarchical’ => 1, ‘exclude’ => ”, ‘child_of’ => 0, ‘parent’ => -1, ‘exclude_tree’ => ”, ‘number’ => ”, ‘offset’ => 0, ‘post_type’ => ‘page’, ‘post_status’ => ‘publish’ ); … Read more

How can I globally italicize certain text?

Add this into your functions.php file. This is untested, but should work 🙂 add_filter( ‘the_content’, ‘italicize_latin_names’ ); function italicize_latin_names( $content ) { // Split up the content into an array of single words $words = explode( ‘ ‘, $content ); // Loop through each of those words foreach( $words as $key => $value ){ // … Read more

Can an RSS item be altered with a hook?

the_content_feed is the hook I needed. In my case I am running a regex to replace relative URLs to absolute ones, so I added the following code to functions.php add_action(‘the_content_feed’, ‘relative_to_absolute_links’); function relative_to_absolute_links($content) { return preg_replace(“/(src=[‘\”]){1}\/{1}([^\/][^’\”]+)([‘\”])/im”, “$1” . get_site_url() . “/$2$3”, $content); }

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