Kyle Pott
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to display multi pages in the same page?Hello!
I think what you’re trying to describe is how to asynchronously load the menu elements on your WordPress site so that when you click the menu item the page updates without refreshing. If that’s the case there are a number of Ajax (Asynchronous JavaScript) menu plugins you could try. Here’s one possibility.
https://www.ads-software.com/plugins/ajaxify-wordpress-site/
Ajaxify WordPress Site will load posts, pages, search, header, sidebar, footer sections etc. without reloading entire page.
Here’s an example running the Ajax menu: https://demo.youngtechleads.com/
Kyle
Forum: Fixing WordPress
In reply to: Searchable database with a single-field search boxHi Krista,
I’m sorry to hear your client has to manage a recall. You’ve described the project well. There are many ways to achieve your objectives and WordPress can be a great tool to get the job done. It’s the tool that I would use if I were in your shoes. I’m going to suggest one way to tackle this project, other people way weigh in with a different perspective and that’s good, too.
Importing
The first thing you’ll need to do is import your lot codes into MySQL, the WordPress backend. I would not use WordPress directly for this, but there are a number of plugins that could help you if you wanted. I would create a new table within your WordPress database using phpmyadmin and import the CSV file. With a utility like phpmyadmin, this task should be pretty straight forward. Here’s a reference that can guide you through how to do so.https://www.mysqltutorial.org/import-csv-file-mysql-table/
WordPress Page and Menu
The next step would be to create the new recall page and add it to your menu, just as you’ve described. You can do this quite quickly and here’s a guide on how to create menus.https://codex.www.ads-software.com/WordPress_Menu_User_Guide
WordPress Search
Since you can’t write MySQL queries within WordPress directly unless you create a custom PHP page (more on that below), the simplest way to add the lot search to the page you just created would be with a plugin like Easy Query. Easy Query will let you define the query parameter and then add a shortcode right into your recall page.https://www.ads-software.com/plugins/easy-query/
Please note: I’ve not used Easy Query myself, so not giving it a personal endorsement. You’ll find many similar plugins allowing you to create custom MySQL queries and display the results.
Do It Yourself
Alternatively, if you didn’t want to install a plugin, you could create a new PHP page within the wp-content directory, add it to your menu and write the search criteria yourself. It would look something like this. I don’t think this is too ambitious. You’ll need to customize this snippet for your project.<form action="" method="post"> <input type="text" name="search"> <input type="submit" name="submit" value="Search"> </form> <?php $search_value=$_POST["search"]; $con=new mysqli($servername,$username,$password,$dbname); if($con->connect_error){ echo 'Connection Faild: '.$con->connect_error; }else{ $sql="select * from information where Lot_Code like '%$search_value%'"; $res=$con->query($sql); while($row=$res->fetch_assoc()){ echo 'Your lot code matches our records as needing a recall: '.$row["Lot_Code"]; } } ?>
Other Idea
Don’t look past the simplest solution of all, which may be to upload your lot numbers as a simple Excel file. 4500 records, sorted numerically would easy enough for non-technical users to filter through manually or by adding a basic search macro.This may not fit your needs for a bevy of reasons. Just something to think about to meet your customer needs as quickly as possible while you build out the ideal solution you’ve described above.
Good luck! This is a very doable project even if you have very little WordPress experience.
Take care,
Kyle- This reply was modified 5 years, 9 months ago by Kyle Pott.
Forum: Fixing WordPress
In reply to: Where are custom menus stored?Good morning, Chen.
Here’s a link that really shows the detailed mechanics of how the menu is called from the backend and displayed on the frontend. This resides within the /wp-includes/nav-menu.php file.
https://developer.www.ads-software.com/reference/functions/wp_get_nav_menu_items/
Toward the bottom of that page also check out this function wp-admin/includes/nav-menu.php: wp_get_nav_menu_to_edit() which returns the menu formatted to edit.
function wp_get_nav_menu_to_edit( $menu_id = 0 ) { $menu = wp_get_nav_menu_object( $menu_id ); // If the menu exists, get its items. if ( is_nav_menu( $menu ) ) { $menu_items = wp_get_nav_menu_items( $menu->term_id, array( 'post_status' => 'any' ) ); $result = '<div id="menu-instructions" class="post-body-plain'; $result .= ( ! empty( $menu_items ) ) ? ' menu-instructions-inactive">' : '">'; $result .= '<p>' . __( 'Add menu items from the column on the left.' ) . '</p>'; $result .= '</div>';
Kyle
Forum: Fixing WordPress
In reply to: Where are custom menus stored?Hi there! What you may be looking for is the menu_order and post_type fields within the wp_posts table.
https://codex.www.ads-software.com/Database_Description#Table:_wp_posts
Kyle
- This reply was modified 5 years, 9 months ago by Kyle Pott.
Forum: Fixing WordPress
In reply to: errors in the error logI would not worry about this if I were in your shoes. I don’t believe this error will impact your site’s performance, stability, or security.
Kyle
Forum: Fixing WordPress
In reply to: errors in the error logGood morning!
This link may help to explain the situation.
https://stackoverflow.com/questions/26325407/warning-strpos-empty-needle-in-wordpress-plugin
A bunch of PHP search functions use the terms “needle” and “haystack” as their parameter names, indicating what is sought and where to seek it.
The strpos function is such a function. “Empty needle” means that you have passed in a null or empty value as the needle to look for. This is like saying “search for nothing” which doesn’t make sense to the function.
The warning should go away if you set WP_DEBUG to false in wp_config.php.
Kyle
Forum: Fixing WordPress
In reply to: Trying to find out wich plugins have been usedHi Kevin! You can use a utility like WP Scan to help try to locate this information. https://wpscan.org/
[+] This site has 'Must Use Plugins': https://repairphone.nl/app/mu-plugins/ | Reference: https://codex.www.ads-software.com/Must_Use_Plugins [+] WordPress theme in use: repairphone | Location: https://repairphone.nl/app/themes/repairphone/ | Style URL: https://repairphone.nl/app/themes/repairphone/style.css [+] cookie-law-info | Location: https://repairphone.nl/app/plugins/cookie-law-info/ | Last Updated: 2019-03-14T05:54:00.000Z [+] gravityforms | Location: https://repairphone.nl/app/plugins/gravityforms/ [+] wordpress-seo | Location: https://repairphone.nl/app/plugins/wordpress-seo/ | - https://repairphone.nl/, Match: 'optimized with the Yoast SEO plugin v10.0
- This reply was modified 5 years, 9 months ago by Kyle Pott.
Forum: Fixing WordPress
In reply to: Clearing all Post and Media for reinstallation on a new domainHello, Calvin! Here is a link to the database schema for WordPress which describes how the back-end is organized for a standard installation. Focus on the wp_posts table which I believe is where you’ll do most of your work. It is very simple to delete all rows if you really want to delete everything.
https://codex.www.ads-software.com/Database_Description
If you have phpmyadmin installed, you can efficiently delete all (or some) posts depending on criteria you specify. Additionally, you’ll want to delete the media out of the wp-content folder which you can do manually or with 100,000+ files I could recommend connecting over SSH. Here is helpful approach to deleting all (or some) content depending on the criteria you specify including custom wildcards.
https://www.webhostface.com/kb/knowledgebase/ssh-rm-command/
Kyle
- This reply was modified 5 years, 9 months ago by Kyle Pott.
Forum: Fixing WordPress
In reply to: Problem with returning value from shell_execGood afternoon! Since the check is calling for the shell to launch mysql with the version flag, my guess is that there may be logic comparing versions further in the script. Since the software is out of date, you may have updated an application beyond what the original script was expecting. Alternatively, there could be a parsing error with the mysql version return string.
If the original developer simply wanted to verify that mysql was installed, another way they could have implemented this check would be:
which mysql
orlocate mysql
which return the paths of the mysql binaries – which, in my opinion, are more helpful than asking for the mysql version.Have you inspected the code to see if version numbers are compared elsewhere? It’s my opinion that simply avoiding this check would be fine. As you’ve said, you’ve verified that the code is still working and this seems like a trivial validation to me.
Kyle
- This reply was modified 5 years, 9 months ago by Kyle Pott.
Forum: Fixing WordPress
In reply to: Posts not saving with SubcategoriesHi Kevin,
I doubt this would be a .htaccess configuration issue, so I would steer clear of adjusting that file. Take a look at this post which could be helpful for you. There’s a section about sub-categories that are not tied to a parent that may be relevant to the issue you’re experiencing:
If you choose to file a post under the child category but not under the parent category, then your post will appear only on the archive pages of child category.https://www.wpbeginner.com/beginners-guide/how-to-add-categories-and-subcategories-to-wordpress/
Kyle
Forum: Fixing WordPress
In reply to: How to start over from scratchI’m sorry it’s been such a long and challenging journey. One last approach you can consider would be to use a site like Upwork.com where a community of very talented WordPress developers can bid on your proposed work. You can structure the arrangement as a fixed-price, result-based arrangement to help you manage cost and the developers have clear expectations for what to deliver.
Sorry again and take good care.
Kyle
Forum: Fixing WordPress
In reply to: How to start over from scratchGood evening! I’m sorry you’re having such a frustrating time. If you’d really like to delete everything and start over from scratch, the easiest way to do this would be to delete your WordPress folder and all the files, re-upload WordPress, build a new MySQL database, and re-configure your wp-config.php file. The directions here will get you going.
I would be glad to answer specific questions along the way. Hang in there, you can do this.
Kyle
Forum: Developing with WordPress
In reply to: Image from plugin not updatingGood morning. The drawing definitely helps. Two things come to mind. One would be to run your whole install on a fresh host and server. This would just rule out any strange caching settings on your server set by your host.
The second potential could be related to your shortcode logic. I’m hung up on the argument and thinking that may not be getting passed as you’d like.
Without seeing your code it’s hard to know, but just guessing here, there is an argument you are passing that differentiates the images somehow, that argument could be passed from footer.php to images.php may not be operating the way you intend it.
I know you don’t want to have an argument at all, but somehow that is making your code work as you intend – I’d spend some time tracing what’s happening when you send the argument and that may lead you in the right direction.
Good luck!
Kyle
Forum: Fixing WordPress
In reply to: Need to navigate up and down the “all posts” listGood morning, Phil! I think this plugin will suit your needs:
https://www.ads-software.com/plugins/admin-post-navigation/
This plugin adds “← Previous” and “Next →” links to the “Edit Post” admin page if a previous and next post are present, respectively. The link titles (visible when hovering over the links) reveal the title of the previous/next post. The links link to the “Edit Post” admin page for the previous/next posts so that you may edit them.
Have a good day!
Kyle
Forum: Fixing WordPress
In reply to: Content Transfer/OrganizationI can tell that changing the slugs didn’t work for you and I’m sorry about that. You may have a plugin/theme conflict. I can see you have Yoast installed and others have noted a similar issue in the past in that sub-forum about category pages not showing up. There is a suggested fix over there that you could try.
https://www.ads-software.com/support/topic/links-to-categories-produce-blank-pages/
Before you do that though, you may want disable all plugins in WordPress, to see if the /category/life-changing-articles/ page loads as you’d expect.
Sorry about all this!
Kyle