Problem with images URL after filter applying

<?php $string = ‘Sentence 1. Sentence 2? Sentence 3! Sentence 4… Sentence 5… Sentence 6! Sentence 7. Sentence 8. Sentence 9… Sentence 10… Sentence 11. ‘; $sentences_per_paragraph = 3; // settings $pattern = ‘~(?<=[.?!…])\s+~’; // some punctuation and trailing space(s) $sentences_array = preg_split($pattern, $string, -1, PREG_SPLIT_NO_EMPTY); // get sentences into array $sentences_count = count($sentences_array); // … Read more

Get Attachment Category Name

The answer was found here: http://www.wprecipes.com/how-to-display-category-name-without-link For my purposes, I needed to define the category function and then call it by name-only inside the php echo: <?php $category = get_the_category($attachment->ID); echo ‘html goes here’; echo ”.$category[0]->cat_name.’; ?> Additionally, to help eliminate space or punctuation in the category name, it can display the slug instead: <?php … Read more

Email Exists ERROR into Ajax registration form

Why are you making work hard for yourself? wp_create_user already checks if the email/login exists, which is also why your code is “failing” – $user_id will already be a WP_Error, so your elseif ( is_wp_error( $newerrors ) ) never fires. All you need is: $user_id = wp_create_user( $sanitized_user_login, $user_pass, $user_email, $capa ); if ( is_wp_error( … Read more

Add URL parameter to all internal links using a specific theme

You can set the $_GET global internally. By saving the parameter passed as user meta and/or a cookie and retrieving it later. This would probably have to be put in your /wp-content/mu-plugins/ folder to work properly (so it is loaded early): <?php $parameter=”theme”; // default for theme test drive $savemethod = ‘both’; // ‘usermeta’ (only), … Read more

child parent styles enqueue order

Looking at the id’s in your rendered code, the name of your parent style seems to be ‘basic-css’. That would mean you need array(‘basic-css’) as the dependency in your wp_enqueue_style. However, in the code the child style seems to be called ‘defaultbasic-css’, while you enqueue it as ‘child-style’. So it looks like there is some … Read more