Joms
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: tag__not_in for multiple tags?I recommend using an array for your arguments to make it easier to read. So with your query try this instead:
$args = array( 'post_type' => 'plants', 'posts_per_page' => 999, //if you intend to show all posts you can just use -1 here instead 'orderby' => 'title', 'order' => 'ASC ', 'tag__not_in' => array( 12,22 ) );This will probably require a membership plugin. Depending on your needs it might be a bit overkill but checkout these plugins: https://wordpress.org/search/membership
Forum: Localhost Installs
In reply to: Funky permalinks settingsJust for context why/where do you want to flush the rewrite rules? If it’s for a plugin I suggest calling flush_rewrite_rules() on plugin activation/deactivation. You can find some code snippets here: https://codex.wordpress.org/Function_Reference/flush_rewrite_rules
Forum: Localhost Installs
In reply to: Funky permalinks settingsWP caches rewrite rules. So when a plugin or a theme modifies a rule the cache should be regenerated to reflect the changes. This can’t be done on every page load since this will considerably slow the website down. So WordPress flushes the rewrite rules on the Permalink settings page.
Forum: Fixing WordPress
In reply to: Update completely broke my websiteForum: Fixing WordPress
In reply to: how to display query data from php coding in wordpressAfter your $wpdb->get_results() call try adding:
$wpdb->show_errors(); $wpdb->print_error();This will help you troubleshoot your SQL problem.
https://codex.wordpress.org/Class_Reference/wpdb#Show_and_Hide_SQL_ErrorsForum: Fixing WordPress
In reply to: how to display query data from php coding in wordpressYes but you have to put the code of contact_search.php ON the same file as the HTML code as well.
You will just then need a condition to determine that your form has been posted. Something like:
if ( isset( $_POST['submit'] ) ) { //the form has been submitted, process the data //place your contact_search.php code here } else { //the form has not yet been submitted //show your form here (HTML) }Then change your form action to
""so the form will post to itself. No need to point it anymore to contact_search.php since it’s inside your file.Forum: Fixing WordPress
In reply to: how to display query data from php coding in wordpressnow i want to know how to call my php page in which i have written query on post data
Are you referring to the content of
/contact_search.php? If so you can place it on the same template file that you created like on the examples.Forum: Fixing WordPress
In reply to: how to display query data from php coding in wordpressIt’s because you are posting to
http://www.lamartinierelucknow.org/contact_search.phpand that means the file should be at your WP’s root directory.A better way to achieve what you want is to create a custom page template inside your theme. Then assign that template to a WordPress Page. The template file will then have both your PHP code and HTML for the form.
Here are some examples that could help you get started:
http://www.webdesign.org/how-to-create-contact-page-template-in-your-wordpress-theme.22210.html
http://www.paulund.co.uk/creating-wordpress-custom-page-templatesThe navigation should be called after
query_posts($args);function. Also instead ofnumberpoststry usingposts_per_pageinstead.You forgot to use the $args array. Change
query_posts()toquery_posts($args). I also suggest addingwp_reset_query()after the loop.For more info: https://codex.wordpress.org/Function_Reference/query_posts
Forum: Fixing WordPress
In reply to: White screen after 4.4.2 update and image issues…I really don’t understand why an update would delete my content – or am I misunderstanding where it’s re-filed things?
Me neither, that could NOT happen. It could have happened after the update – when the website was blank and you created the directories manually, you *might* have accidentally deleted folders. Or it could also be that your account has been compromised and someone else deleted them. Another reason is the changing of your uploads directory path, but I doubt it since your theme was gone as well.
It’s really hard to tell at this point.
Your best bet is to get in touch more with your web host. Ask for assistance regarding server logs as they might help you understand what happened. Good luck!
Forum: Fixing WordPress
In reply to: White screen after 4.4.2 update and image issues…The images are in the wp-content/uploads directory. This is a sample image on your website which is missing:
http://girodilento.com/wp-content/uploads/2016/01/DSC03771-1038×576.jpg
You can try to check that file through FTP.
Forum: Fixing WordPress
In reply to: Website Crashed / Fatal ErrorYou will have to manually update the website since the update failed.
Guide: https://codex.wordpress.org/Updating_WordPress#Manual_Update
Forum: Fixing WordPress
In reply to: 404 (Page Not Found) ErorSome files might have gotten corrupted when the automatic update was done. You can try a manual update via FTP. Follow the guide here: https://codex.wordpress.org/Updating_WordPress#Manual_Update
You can also try deleting the .htaccess file found in the root directory of your site. This can be the cause of the redirect problem. Make sure to create a backup of it first so you can restore it later if something goes wrong.