Jquery Slider for profile template

You can use carousel javascript to get the desired output. There are various carousel available, you can use some thing like jcarousel. Download the js and css from the jcarousel website and en-queue it in your theme to use it. Note : You will have to manage the dependencies of it with jQuery. Let me … Read more

Credit link that if removed stops site from working

—————- UPDATE —————- I do some change of the code provide by @Rizier123 Now it will accept to add a link in the citation varibale You need to change the line of preg_match ( Thanks goes to @Rizier123) by this : if(!preg_match(“https://wordpress.stackexchange.com/” . preg_quote($citation_string, “https://wordpress.stackexchange.com/”) . “https://wordpress.stackexchange.com/”, $footer_contents)) so the final code will be like … Read more

Get rid of Another update is currently in progress

It is an automatic lock to prevent simultaneous core updates. It will be gone after 15 minutes. If you don’t want to wait, delete the record from options table – usually wp_options. Since WordPress 4.5: option_name=”core_updater.lock” If you have an older installation (before WordPress 4.5): option_name=”core_updater”

Where to put my code: plugin or functions.php?

I would start with this question: Is the functionality related to presentation of content, or with generation/management of content, or of the site, or of the user identity? If the functionality is not related specifically to presentation of content, then it is squarely within Plugin Territory. This list is long: Modifying core WP filters (wp_head … Read more

How to Protect Uploads, if User is not Logged In?

Only checking if the cookie exists, is not much of a strict protection. To get a stronger protection, you can pass or “proxy” all requests to the uploaded folder (exemplary uploads in the following example) through a php script: RewriteCond %{REQUEST_FILENAME} -s RewriteRule ^wp-content/uploads/(.*)$ dl-file.php?file=$1 [QSA,L] All requests to uploaded files (which includes images in … Read more

Using wpdb to connect to a separate database

Yes it’s possible. The wpdb object can be used to access any database and query any table. Absolutely no need to be WordPress related, which is very interesting. The benefit is the ability to use all the wpdb classes and functions like get_results, etc so that there’s no need to re-invent the wheel. Here’s how: … Read more

Uninstall, Activate, Deactivate a plugin: typical features & how-to

There are three different hooks. They trigger in the following cases: Uninstall Deactivation Activation How-to trigger functions safely during the scenarios The following shows the right ways to safely hook callback functions that get triggered during the mentioned actions. As you could use this code in a plugin that uses plain functions, a class or … Read more

Verifying that I have fully removed a WordPress hack?

Have you identified the exploit vector? If not, you may be leaving yourself open to future exploit. Other things to consider: Change WordPress admin user passwords – done Change Hosting account user password Change FTP passwords Change MySQL db user password – done Change the db table prefix Update your wp-config nonces/salt Check your directory/file … Read more