Custom search with meta fields

I think that your main problem is that you are trying to display the results with searchform.php. That is basically just the form for the search, which you don’t need since you have your own form in the sidebar (if I understand you correctly). The results of a WP search are displayed with “search.php“

WordPress mu domain mapping

Essentially, no. If you look at how that plugin stores its mappings: mysql> desc wp_domain_mapping; +———+————–+——+—–+———+—————-+ | Field | Type | Null | Key | Default | Extra | +———+————–+——+—–+———+—————-+ | id | bigint(20) | NO | PRI | NULL | auto_increment | | blog_id | bigint(20) | NO | MUL | NULL | | … Read more

Filter and Search

I don’t believe there’s anything automatic for what you’re looking for, no. I built a similar functionality for sorting products with dimensions, but this was all custom as I did not find anything that suited my needs. You’d need to look into pre_get_posts using $_GET requests.

Displaying posts limit: can’t get pagination to display [duplicate]

Try reviewing this page on the codex. Using your above template, I would suggest the following: <?php if ( is_user_logged_in() ) : $args = array( ‘posts_per_page’ => ‘5’, ‘author’ => get_current_user_id(), // Removes a few lines of code 😉 ); $author_posts = new WP_Query( $args ); ?> <?php /* Author has posts? */ ?> <?php … Read more

How do I add a nested conditional within an echo – to use a default image if there isn’t one in the post?

try this $second_query = new WP_Query( $args ); if ( $second_query->have_posts() ): while( $second_query->have_posts() ) : $second_query->the_post(); $attachment_id = get_field(‘image’); $size = “customfeatins”; // (thumbnail, medium, large, full or custom size) $my_image = wp_get_attachment_image_src( $attachment_id, $size ); if (!my_image !== ”){ $image = $my_image[0]; } else { $image=”http://domain/image_source/your_image.jpg”; } endif; echo ‘<article> <img src=”‘ . … Read more

Why are all pages redirecting to homepage when using custom permalinks?

Here’s my .htaccess … there are a few differences, perhaps it might be worth comparing: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ – [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ – [L] RewriteRule . index.php [L] </IfModule> Also, I assume you … Read more

why the current date do not update

From the codex: <?php $wpdb->update( $table, $data, $where, $format = null, $where_format = null ); ?> In your exampe ‘ CURDATE()’ is simply a string, not a MySQL function (or something else). The correct syntax for php’s date() is: date( [format], [timestamp] ) Try this: $this->wpdb->update( ‘wp_competitors’, array( ‘results’ => $tips, // json ‘update_time’ => … Read more