Jay
Forum Replies Created
-
@cgdesierto11 no need to double post – a reply was posted in your other thread.
@susane
See the FAQ for getting hacked: https://codex.wordpress.org/FAQ_My_site_was_hackedForum: Fixing WordPress
In reply to: Disgruntled former CTO hacked our admin officeDon’t change just the user/pass, change his access level, and/or email. If you only change his password, he can still do the ‘forgot password’ form and reset it.
If you’ve already done all that, you may have a backdoor in your code somewhere or you’ve been hacked.
If all else fails have a look at the FAQ https://codex.wordpress.org/FAQ_My_site_was_hacked
Chances are if you follow the above FAQ and he/she can still gain access, you may have a backdoor, which will require a developer’s intervention.
Forum: Hacks
In reply to: get post Foreach tag displays mutilple post in invalid arrayFirst, your initial foreach doesn’t make sense, you’re doing
foreachwith a key value pair, but not using either key or value…Problem 2, the location key, well… isn’t a key, nor is it surrounded by quotes, so your code should break right there.
Instead of me just pointing everything out in a sentence, have a look at your current code, commented:
https://gist.github.com/JayWood/b071afd337c9e2bf1086/9991dba9a2daf625e64e3981db5aa79abf9f8a22
Now the clean version of the same gist, heavily commented:
https://gist.github.com/b071afd337c9e2bf1086
Let me know if this helps you, I’d be glad to explain further.
Forum: Hacks
In reply to: How to change default URL for new script wp-emoji-release.min.jsAt first I looked over this and said ‘it’s not possible’ but completely ignored the
apply_filterscall staring me right in the face!<?php function filter_my_script_location( $script_url, $script_name ) { if ( 'concatemojoi' == $script_name ) { $script_url = 'http://mydomain/wp-emoji-release.min.js'; } return $script_url } add_filter( 'script_loader_src', 'filter_my_script_location', 10, 2 );A pretty good how-to when it comes to filters: https://pippinsplugins.com/a-quick-introduction-to-using-filters/
Forum: Hacks
In reply to: Query more than 750 postsHere’s problem 1.) You’re trying to put 750+ post titles in a dropdown, and problem 2.) You’re pulling ALL post data from 750+ posts.
In problem 1 you’re going to eventually crash the browser when you get more than 1-2,000+ entries, I’ve seen it happen.
To solve problem two, you use the
fields => 'ids'parameter, and return ONLY ids. This would of course require you to modify your loop, but would overall help with the amount of data stored in PHP’s memory at the time of execution.Overall Solution
Switch to a sort of ‘auto-suggest’ or auto-complete search field instead. I’m sure they’re out there, putting that many things in a dropdown is just crazy!Forum: Hacks
In reply to: how to display two images in testimonialWith code there is always a way, you just have to know how to do it. I suggest you find at least one plugin that does at least most of what you need, then modify it to fit your needs.
Forum: Fixing WordPress
In reply to: Problems with HTML ?For the love of god please put that code in a code block… you just broke the forum! lol
Forum: Fixing WordPress
In reply to: Problems with HTML ?I can only assume you’re talking about the list in the content. Looks like the CSS for UL elements in content data will need to be updated. Look at
style.css line 272If it’s the indentation you’ll need to up the margin on the left, right now it’s set to:
margin: 0 0 20px;You’ll need to add another 20px declaration like so:margin: 0 0 20px 20px;This does, however affect your navigation as well, so you’ll need to target lists ONLY in content.
Forum: Hacks
In reply to: How to create charts in own pluginThe best way would be to use JavaScript and NOT php to generate the chart image itself. Sitepoint had a great article on some top chart libraries: http://www.sitepoint.com/15-best-javascript-charting-libraries/
Basically what you would do is use wp_localize_script() to drop in your javascript data points from PHP, and use javascript to translate it into your chart plugin of choice.
Forum: Fixing WordPress
In reply to: Header title problemFirst, did you even test your code? The first code block ( header ) would’ve thrown an error
is_page(archive-listing.php)would’ve needed to be quoted.Now onto the issue, that is the wrong conditional to use. is_page() checks if you’re on a specific page, not a specific page template. SO, let’s say you have an
/about-us/page, to see if you were on that you’d dois_page('about-us')You may want to use the
is_page_template()[Codex Link] instead, if in-fact you have that archive page as an actual page in your admin.If, however, you’re using the template hierarchy to your advantage ( as is evident by the template name ), you’ll be able to use the
is_tax()[Codex Link] conditional instead. So something like this:is_tax( 'listing' )Okay I had a look into the code, and without re-localizing the script, there’s no easy way to alter the cookie name.
I will, however, be looking into adding this functionality to the dialog.
Instead of basing the conditional off of post ID, use is_user_logged_in()
This plugin wasn’t really meant to be a pay-wall. Just know that any well-knowing developer or even HTML savvy user will know how to hide the popup.
Forum: Plugins
In reply to: [Agy - Age verification for WooCommerce] How to discard some pages?I don’t have a link to your site, and please don’t post NSFW links here. You, as the developer, should be testing your code, not me.
Well if there’s a shortcode, there’s a function behind that shortcode. I’d say look into that function to find out how S2 is determining membership and use that determination in the wiki code I provided.
That would be the best solution.