tsguitar
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Cannot Modify Header Info Error: opears.jpg? Adding www?Just an update to this, but it ends up that the opears.jpg was somehow redirecting visitors only in certain parts of the world. We had a few people say that our site was loading some kind of German exercise or health pill site.
Anyhow, I installed Wordfence, Succuri, and a few other things, along with taking a few other measures, and that seems to have solved the problem. I ran each of those plugins and they gave me an idea of what I needed to do. It wasn’t too complicated and I ended up simply removing a line of code from one of the core WP files, a line that shouldn’t have been there at all. Wordfence did the best at telling me what was wrong, though Succuri is a nice addition to keeping the site secure.
From what we can tell, now nearly a month later, out site is clean and I have a much better picture on who is doing what and when to the site. This has a happy ending, fortunately. So just in case someone else stumbles upon this, I hope this added detail of the final steps I took to solve this helps. Let me know if I can tell you anything else.
Thank you, Steve, for your help here.
Forum: Fixing WordPress
In reply to: Replicate wordpress on offline staging serverOh yikes! I’ve done that kind of find and replace in the past without any trouble. In fact, it was nearly this exact kind of situation where I needed to find old URLs and replace them with new ones.
So maybe replacing the URL through a filter after it’s called out of the DB is better?
Forum: Fixing WordPress
In reply to: Cannot Modify Header Info Error: opears.jpg? Adding www?Oh my! What are you seeing that makes you think this is the case? I want to have some more detail to give my hosting company when I’m ready to have that conversation.
Thanks for your reply! Anything else you can tell me would be helpful. Fingers crossed that it’s not too insidious or deeply entrenched.
Forum: Fixing WordPress
In reply to: Replicate wordpress on offline staging serverCan you put a filter on any calls to image URLs? So you’d filter out whatever part of the URL refers to an online server and replace it with local://mysite.staging.com or something similar? Using str_replace might work: https://www.php.net/manual/en/function.str-replace.php
So something like:
$onlineimageurl = "https://xxxyyy.cloudfront.net/images/"; $localimageurl = "local://mysite.staging.com/images"; $wordpressimagelocal = str_replace ($onlineimageurl, $localimageurl, $wordpressimageonline);
Now $wordpressimageonline spits out a URL with the first part of it replaced to point to your local copy. I think?
Or you could do a find a replace in your local database using this same logic: find the online beginning URL of all images and replace that URL with your local URL. WordPress has some find and replace plugins, though if you can manage this on your local database that might be easier. That would change all image URLs in the database to point to a local copy instead of the online one.
Keep us posted!
Forum: Developing with WordPress
In reply to: Call a function from pluginA to pluginBWould it be possible to simply write this all as a single plugin instead?
What happens if you simply call the function as you describe here? That might work.
If you use global for the result of one function, you can then use it in another:
https://stackoverflow.com/questions/18517705/pass-php-variable-created-in-one-function-to-anotherAre you writing this all in your functions.php file or are you write 2 separate plugins? I’m not sure it’s a good idea to make 2 plugins dependent on each other, otherwise one can’t work without the other. In which case, it should probably be a single plugin with multiple functions instead.
Does that get you any closer to what you want?
Forum: Fixing WordPress
In reply to: Hamburger buttonHey there and welcome!
Can you provide a link to the site you’re working on? That often helps figure out things like what you’re asking about.
1) Without a link, I can’t say much here. Are you talking about when you login to your site on a mobile device or when users visit your site on mobile? If it’s when you login, you’ll need that to move from page to page within your mobile admin experience. Otherwise, how would you move to a new page? If it’s for your visitors, there shouldn’t be a way for visitors to add menus, should there? In either case, looking into the responsive nature of your theme is where you can find out about how to turn things on and off in the mobile version. But it all depends on how your theme is handling all of that.
2) That sounds like a lot of functionality! That’s a lot of things you need to coordinate and is asking for a bunch of work. I’d take one thing at a time and start by looking for a plugin that will make the coordinates of those registered available. Are you creating a network with your WordPress install? https://www.ads-software.com/support/article/create-a-network/ Once you figure out how to make the location of your registered users available to others who are registered, next you might tackle the chat feature. Is there a plugin that allows registered users to chat with each other?
I hope that at least gives you some ideas to start with! More detail could help others tell you some other useful info.
Forum: Fixing WordPress
In reply to: Site down + locked outThis sounds like an issue with your hosting company. Have you contacted them to ask for help? If it’s a database problem and you can’t get it, that might be an option.
Good luck and keep us posted!
Forum: Fixing WordPress
In reply to: Cut and paste into a new post no longer worksWoo-hoo! I had trouble with Gutenburg, too. I just didn’t do the thing I needed it to do and that I built an entire site around doing. It’s easy to turn on and off.
Glad that worked for you!
Forum: Fixing WordPress
In reply to: How do I remove or edit the top bar of my webpage?How did that bar come to be there? Is there a WordPress theme you’re using?
It looks like this is the code to remove:
<div class="row"> <div class="span6 social-nets-wrapper" data-motopress-type="static" data-motopress-static-file="static/static-social-networks.php"> <img src="//www.droneguts.com/wp-content/themes/theme54792/images/bitcoinacceptedsmaller.gif" /> <ul class="social"> </ul> </div> <div class="span6" data-motopress-type="static" data-motopress-static-file="static/static-top-links.php"> <div class="top-links"> <ul> <!-- <li><a rel="nofollow" href="https://www.droneguts.com/wp-login.php">Member Area</a></li> <li><a href="https://www.droneguts.com/sitemap">Sitemap</a></li> --> <li><a href="https://www.droneguts.com/news/">News</a></li> <li><a href="https://www.droneguts.com/aboutus/">About Us</a></li> </ul> </div> </div> </div>
When I view source, those are lines 241-56. Once those are gone, there might be some other DIVs (opening and closing) that you can get rid of, unless you want to put some other stuff in that area.
Does that do the trick?
Forum: Fixing WordPress
In reply to: Cut and paste into a new post no longer worksHave you tried disabling Gutenburg to see if that makes it work the way you want it to?
https://www.wpbeginner.com/plugins/how-to-disable-gutenberg-and-keep-the-classic-editor-in-wordpress/
https://kinsta.com/blog/disable-gutenberg-wordpress-editor/In that last one, I used option 3 and just added a small bit of code to my functions file. It worked perfectly.
I wonder if that will let you copy and paste like you used to. Let us know!
Forum: Fixing WordPress
In reply to: Remove special characters from filenamesYou might not have to change the filenames in the database. When you call the filenames out in WordPress, you can set up a filter in PHP to remove those special characters and replace them with letters without those accent marks. This might give you a lead:
https://stackoverflow.com/questions/1770250/how-to-remove-diacritics-from-textSo it can take something like qué and change it to que. If your filenames have those accents removed, a filter should do the trick on whatever is in the database. Make sense?
As for the files that are already uploaded, I really do think you’ll need to change all of those yourself. But a quick search lead me here:
https://www.ads-software.com/plugins/file-renaming-on-upload/So maybe you’ll simply have to upload everything again? That’s likely quicker than changing all the filenames yourself.
Forum: Fixing WordPress
In reply to: Hide shortcode from specific browsers?Can you explain a bit more what’s going on here? If image_loaction=’bg’ doesn’t work for IE11, is there some other method to achieve what you want?
I think browser sniffing is possible (but full of all kinds of problems), but it’s not a WordPress feature. You could try Googling “browser sniffing” to see if that gets you anywhere closer to where you want to be.
Forum: Fixing WordPress
In reply to: convert “link_pages” to “wp_link_pages”What if you use the
pagelink
attribute?
<?php wp_link_pages('pagelink=<img src="wp-content/themes/brink/images/button_%.gif" />%') ?>
I’m thinking that will call for
button_1.gif
for the first page,button_2.gif
for the second page, and so on. Then you just change the names of your GIFs accordingly. Give that a shot. And look at the code to see if any part of that IMG tag renders. The image might not show because of an incorrect URL to the image, but just make sure the code is even working as it’s supposed to. I don’t use pages at all so I’ve no way to test this myself.And if you’re going to bump, try to at least give an update on what you’ve tried to do since you last posted, things you’ve read, experiments that failed, etc. That’ll help us know what you’ve already tried and tell us that you aren’t just sitting on your hands in the meantime.
Forum: Fixing WordPress
In reply to: query_postsDo you end one
query_posts
loop before you begin the other one? I can’t see them interfering with each other otherwise. Including a link to the way the page renders with both loops in action will help (think about putting your code in a pastebin somewhere because that might help, too).Forum: Fixing WordPress
In reply to: several “recent entries”, is it possible?The links show up at the bottom of the page because your sidebar.php code requires that they show up there. You have that
query_posts
bit running inside your column1 DIV; your sidebar is all inside the column2 DIV. Look at the source of the page and you’ll see what’s going on and why it shows up at the bottom of the page. You’ll need to edit your template to solve that problem and that should be another thread from this one. This thread was all about showing the latest few posts from different categories and it looks like that’s solved, right?