An old plugin self-made stoped sending mail

Many E-Mail-Hosters changed their rules to prevent spam. Often times, E-Mails that have one domain name in their “from”-Tag and come from a server with a different domain are rejected. So my guess is, maybe the emails are still sent, but not received. You can check this by changing this line: $headers=”From: “.$senderEmail.’ <‘.$senderName.’>’ . … Read more

WP get_permalink Return Wrong URL

IMO It is rarely a good idea to evaluate shortcodes outside of the specific post page as too many times you need the context for either the evaluation itself or styling. Your problem is most likely related to the use of the_post and wp_reset_postdata. What is exactly the post being reset to in that case? … Read more

Help!! I Screwed up my WP

since i posted as a comment and most people miss the good tips that are in the comments, I’m posting again as an answer The reason is because GD Star rating plugin creates custom capabilities and your query deleted all references of %rating% it deleted the wp_user_roles option which holds all capabilities roles. the solution … Read more

I can’t access wordpress functions from an ajax php call

You are making a new request to the server and you appear to be loading a page that is not loading WordPress core functions. I’d need to see your HitCount.php to confirm this but I can’t think of another explanation. Loading WordPRess files piecemeal is tricky and prone to breakage as core code changes. You … Read more

Author Specific URL’s in WordPress

here you go: add_action(‘init’, ‘wp_new_flush_rewrite_rules’); //Run this action only ONCE if not you are looking at 2 extra db queries on every page load so dont forget to comment it out function wp_new_flush_rewrite_rules() { global $wp_rewrite; $wp_rewrite->flush_rules(); } add_action(‘generate_rewrite_rules’, ‘new_rewrite_rules’); function new_rewrite_rules( $wp_rewrite ) { $post_type=”post”; $new_rules = array( ‘writer/(.+?)/page/?([0-9]{1,})/?$’ => ‘index.php?post_type=”.$post_type.”&meta_key=writer&meta_value=”.$wp_rewrite->preg_index(1).”&paged=’.$wp_rewrite->preg_index(2), ‘writer/(.+?)/?$’ => ‘index.php?post_type=”.$post_type.”&meta_key=writer&meta_value=”.$wp_rewrite->preg_index(1), … Read more

Add Top-Level Menu that opens URL

I’ve experimented with various solutions or workarounds proposed elsewhere on this site – for instance here: Adding an Arbitrary Link to the Admin Menu? and this one here: http://www.techedg.com/2014/09/06/5575/a-simple-way-to-add-an-external-link-to-the-wordpress-admin-menu/ All of the solutions that I tested that worked included that behavior of adding an unwanted blank admin page. I’m not sure that there is not … Read more

Is there a plugin that allows a user of your site to get an email from you with an attachment?

you can use wp_mail( $to, $subject, $message, $headers, $attachments ); to send emails with attachments. So all you need is a simple form <form name=”email-att” id=”email-att” method=”POST” action=””> Enter your emial: <br /> <input type=”text” name=”email” id=”email”/><br /> <input type=”hidden” name=”action” value=”email-att”/><br /> <input type=”submit” name=”submit” value=”submit” id=”submit”/> </form> and to process it <?php if … Read more

How to list all active and specific shortcodes in wordpress

The conditional needs to test against strings which would be the name of the shortcode. If you’re looking for the [hello] shortcode the conditional would look like: echo ‘<pre>’; print_r( $shortcode_tags[‘hello’] ); echo ‘</pre>’; So if you use add_shortcode() the string you’ll be looking for is the first parameter: $tag.