New User Registration email

In the admin interface under Settings > General there is a field named E-mail Address. Unless you have a plugin managing your user registration separately, this should be the default email address for registration confirmations.

Pagination not working properly

Don’t use query_posts in the template. If you delete that line, your template will paginate correctly. If you want to alter the main query, use the pre_get_posts action. Currently, your query overwrites the default main query, and you don’t set any pagination parameters within the query, so you’re always going to get the first 10 … Read more

How can I use Varnish Edge Side includes for a sidebar?

You can do something like the following: If you have a sidebar called “Sidebar” <?php if ( !dynamic_sidebar(“Sidebar”) ) : endif; ?> You wrap it in ESI tags, one for if ESI is not enabled and one if it is: <esi:remove> <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar(“Sidebar”) ) : endif; ?> </esi:remove> <!–esi <esi:include src=”https://wordpress.stackexchange.com/wp-content/plugins/myplugin/esihandler.php”/> … Read more

How can i add a random redirect button in wordpress? [closed]

you can use this code add_action(‘init’,’random_add_rewrite’); function random_add_rewrite() { global $wp; $wp->add_query_var(‘random’); add_rewrite_rule(‘random/?$’, ‘index.php?random=1’, ‘top’); } add_action(‘template_redirect’,’random_template’); function random_template() { if (get_query_var(‘random’) == 1) { $posts = get_posts(‘post_type=post&orderby=rand&numberposts=1’); foreach($posts as $post) { $link = get_permalink($post); } wp_redirect($link,307); exit; } } ANd then use this for random redirect <a href=”http://…..com/?random=1/” >Random Post</a>

TimThumb cache directory issue [closed]

Check or add the following two config settings: define(‘FILE_CACHE_TIME_BETWEEN_CLEANS’, 80000); // 8 seconds = automatic removal of files define(‘FILE_CACHE_MAX_FILE_AGE’, 20000); // 2 seconds = max. age of file before removed Update Maybe using something like this code snippet in your thumb.php or as a stand-alone script executed by cron can take care of the issue. … Read more

How to set up a echo? [closed]

You can use get_post_type() function and pass current post id to it. global $post; if(get_post_type($post->ID) == ‘videos’) { // do this } Update <?php global $post; if(get_post_type($post->ID) == ‘videos’) { ?> <video class=”video” width=”https://wordpress.stackexchange.com/questions/91208/<?php echo get_field(“width’); ?>” height=”https://wordpress.stackexchange.com/questions/91208/<?php echo get_field(“height’); ?>” controls preload> <source src=”https://wordpress.stackexchange.com/questions/91208/<?php echo get_field(“mp4′); ?>” media=”only screen and (min-device-width: 960px)”></source> <source src=”https://wordpress.stackexchange.com/questions/91208/<?php … Read more

Print out one of 2 post category [closed]

If I understand your requirements correctly: $terms = wp_get_post_terms( $post->ID, ‘category’ ); echo $terms[1]->name; You can see what other values are returned by var_dumping $terms. The above assumes that you are using the category taxonomy.