How to handle a custom form in wordpress to submit to another page?

<form action=”<?php echo esc_url( admin_url(‘admin-post.php’) ); ?>” method=”post”> <input type=”hidden” name=”action” value=”your_action_name”> Add these in your form. Where admin-post.php will process your form. In that case based on the value of your_action_name that is provided by you, an action hook will get involved. Say for example if you add a hook like the following in … Read more

Jquery no more loading, load-scripts.php not found (404)

I had this problem with a multisite setup. On my secondary site load-scripts.php returned a 404 error. the following line in wp-config.php fixed it for me: define( ‘CONCATENATE_SCRIPTS’, false ); # worked for me my .htaccess file: # BEGIN manual WordPress Multisite # The directives (lines) between `BEGIN WordPress` and `END WordPress` are # dynamically … Read more

How to return the_excerpt (without echo)?

Sure thing my friend, you see, the function “the_excerpt” (located at “WORDPRESSINSTALLDIR/wp-includes/post-template.php”) is the one that makes the echo: function the_excerpt() { echo apply_filters(‘the_excerpt’, get_the_excerpt()); } so, what you want is to use the same function “apply_filters” without the echo: $myexcerpt = apply_filters(‘the_excerpt’, get_the_excerpt()); …and there you have your excerpt.

WordPress custom taxonomy description for each post?

sounds like a silly question but are you echo’ing it out? <?php echo term_description($term_id, $taxonomy); ?> otherwise you’ll need to get the current post’s terms (where my_term is your custom taxonomy): $terms = wp_get_post_terms( $post->ID, ‘my_term’ ) then get the description for the first term in ther array: echo term_description($terms[0]->term_id, ‘my_term’); I’ve not tested this … Read more

How do i hide the if the appears

There are two ways to do this, though one is arguably better than the other. Use JavaScript (Works, but not optimal) The first way to do this is by using JavaScript. I’m not a fan of using this approach because it requires a web browser to perform the toggling. This negatively impacts SEO because, to … Read more

How can I remove “Proudly powered by WordPress” from twentyeleven without modifying footer.php?

There are 3 methods. Somewhat weird but since this text is internationalized you can filter the output. This is just an example to remove the text, the link is still present in the source. add_filter(‘gettext’, ‘remove_powered_by’, 20, 3); function remove_powered_by( $translated_text, $untranslated_text, $domain ) { $custom_field_text=”Proudly powered by %s”; if ( !is_admin() && $untranslated_text === … Read more

wp_mail function timing out

Well, this isn’t a full solution per se, but I would start by isolating whether the problem is the SQL queries or the wp_mail() call. If you comment out the wp_mail() line, you can get an idea of how long the function takes to run the queries and build the messages without trying to send … Read more