jon
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Shortcode looping/ html tagsRe-reading your question, I realize now that you may actually be writing your own shortcodes.
If so, what I’m talking about is a shortcode that requires an [/shortcode] end tag and returns $content as a parameter. First thing to do with $content is
$content = do_shortcodes( $content );Forum: Fixing WordPress
In reply to: Shortcode looping/ html tags“The shortcode parser correctly deals with nested shortcode macros, provided their handler functions support it by recursively calling do_shortcode()” – https://codex.wordpress.org/Shortcode_API#Nested_Shortcodes
I suspect that the Shortcode author of one of the shortcodes that you are having trouble with is not doing this (“recursively calling do_shortcode()”).
Forum: Fixing WordPress
In reply to: Steps to take before hiring a developer?“Should I give him that main account?? Should I create a new account with admin privileges?” – there is a definitive answer to this that is not related to WordPress.
Long established fundamentals of Computer Security tell you to never share usernames. Doing so really reduces your ability to diagnose and control a security breach. In fact, at my last employer before retiring 10 years ago, an excellent person was fired on the spot when her manager found out she had used someone else’s username while “someone else” was on vacation. Just once! That is how important the folks in charge of Computer Security considered the one person/one username rule was.
In WordPress terms, it is the difference between shutting down your entire site versus disabling one username if a security issue occurs. It is a lot easier to figure out what happened, too.
This is not really an issue of Trust. Bad things happen to good people, including infected computers. Even the best antimalware software occasionally misses a brand new piece of malware.
Nightly backups are essential. I do incremental backups of my entire Linux server to Cloud storage using (open source) Duplicity, which allows me to turn the time machine back to any date (but always the same time, in the middle of the night) since I first built the server. For commercial shared hosting, I cannot run Duplicity directly, so I plan to use (open source) sftp on my Linux server to copy the shared hosting files and database each night, then use Duplicity to incrementally backup to Cloud storage from my Linux server copy. I’ve been pleasantly surprised at just how small the nightly incremental is.
In general, I would treat the developer like a well meaning human being — being human means mistakes and external factors can happen — just as you should an employee, and help your developer deal with potential issues. As well as backup, you should be doing monitoring to detect when something goes wrong.
Forum: Fixing WordPress
In reply to: Planning questions for move of 13 year old websiteTopic 1 – Changes to URL Structure:
Just one man’s opinion, but I don’t think it is worth the effort to try and make the old URLs work “perfectly” in your new WordPress environment. But, just for the record, it could be done a couple of ways, both requiring a lot of effort:
- Retain each .html file and replace the contents with an HTML redirect to the new WordPress URL for the relevant Page
- Build your own WordPress plugin and a Mapping Table that does the Redirection using the relevant WordPress PHP function
Instead, I would just use any of the WordPress plugins that allows you to intercept 404 errors and display an appropriate message.
The one exception to what I just said is if you can come up with an algorithm for translating URLs from old to new. Then, #2 above could be adapted be replacing a Mapping Table with your algorithm coded in PHP to translate URLs and Redirect.
Topic 2 – Pages or Posts:
I am a huge fan of Pages, and only use only use Posts if I absolutely have to. To replace existing HTML Pages, Pages really is the only sensible choice. I am not aware of any SEO differences between Pages and Posts, nor can I believe that there are any.
Finally, if you have not done so already, please read https://codex.wordpress.org/Giving_WordPress_Its_Own_Directory#Using_a_pre-existing_subdirectory_install to do as your “Go Live” step. In other words, your final URLs in WordPress should be based on the domain name root, not your current WordPress subdirectory.
- This reply was modified 9 years, 8 months ago by jon.
Forum: Plugins
In reply to: [Multiple Themes] Plugs in not working across both themesNo, I have not seen anything specific to your problem. In general, here are some general things that might or might not apply in your case:
- AJAX is not handled correctly in the current version of the plugin; all AJAX requests go to the Active Theme, no matter where they come from
- I have seen a lot of problems that only exist for the Admin who is testing, but things work fine for any Site Visitor, especially if the Site Visitor is not logged in to WordPress
- Caching, both browser caching, and server-side caching by a plugin, is often a problem, especially after changes are made to the Multiple Themes plugin settings that change what Theme is displayed for a given URL (that is cached)
Hope you get it figured out.
Forum: Plugins
In reply to: [Multiple Themes] Plugs in not working across both themesIt looks like the support for this plugin has moved to here:
http://zatzlabs.com/forums/forum/multiple-themes/I suggest you re-post there for support from the plugin author.
Forum: Hacks
In reply to: Get number of new posts in each category since last visitI was unable to find any way to directly do what you are looking for, so I suspect that the most efficient way to do this is to get all the Posts at once, by dropping the ‘category’ entry in the $args array.
Then there are two approaches to consider, to process the array:
- use PHP array function(s) to do the counts for you
- have get_posts() sort by category, and use a foreach loop to display a count whenever the category changes
The feasibility of Option 2 is dependent on what order you want the Category counts to appear.
Let me know if you need more details on actually coding this.
Forum: Fixing WordPress
In reply to: dashboardAs I understand it, this is an error with your web hosting company. Best to talk to their support folks.
Here is what I read to decide that:
http://www.checkupdown.com/status/E502.htmlForum: Fixing WordPress
In reply to: wpn_woocommerce_termmeta doesn't existI would recommend re-posting this on https://wordpress.org/support/plugin/woocommerce
Reason: woocommerce experts are there, and probably won’t see your question here.
Forum: Fixing WordPress
In reply to: Replace 200 code with 404 for non-existent pagesOut of the box with the default Theme, WordPress does return a 404; I just tested it on my own test site with Firebug.
Take a look at your activated plugins, and possibly even your Active Theme, to see if that is where the redirection to home page happens.
Forum: Plugins
In reply to: [Multiple Themes] Plugin works on local site, but not remote siteIt has been too long since I was involved with this plugin for me to give you “best possible support” type answers, but this is my best shot. I know it sounds stupid, but I have seen it fix otherwise impossible errors:
Make notes of all your settings, double checking that the URLs are correct. Then deactivate and delete the plugin, and reinstall it, and re-enter all the settings.
The reason that this might work is if the plugin stored any Site URL-related info in its settings that are not visible on the settings pages.
Forum: Plugins
In reply to: [Multiple Themes] Plugin works on local site, but not remote siteIt has been several years since I looked at this, so I’m going from memory here.
When the plugin was originally developed, its Settings were portable, in the sense that you could change domain names without having to change the Settings you had created in the plugin.
Over the years, as more features were added, and more themes were supported, portability was sacrificed until portability was totally lost in a redesign.
Bottom line: whenever you change the Site URL, you will almost certainly have to re-enter all of the plugin’s URL-based settings.
Forum: Fixing WordPress
In reply to: Illegal string offset warningNot sure how much this will help you, i.e. – you probably already know this, but….
In the PHP code you displayed, the function
groups_get_groupmeta()is returning a string, rather than an array, value.Forum: Fixing WordPress
In reply to: Corrupt Database Tables – No BackupOn the off chance that no one has thought of this yet, has your friend contacted his web host’s support folks? Almost all do automatic backups daily and/or weekly. Of both files and databases.
Be sure to act quickly, as hosts don’t keep their backups for long.
Other than that, I’ve seen a few people without backups go to archive.org and re-create their site from its state 6 or more months ago.
Forum: Fixing WordPress
In reply to: Email before downloadAlthough the entry says that, this post leads me to believe that it worked properly as of 4.5.3:
https://wordpress.org/support/topic/issues-with-latest-wp-update?replies=2I think it is worth trying, especially given the 20,000+ active installations using it.