Forum Replies Created

Viewing 15 replies - 16 through 30 (of 871 total)
  • Hi haagsekak,
    Sorry, I’ve understand your issue, I just thought you are looking only for an example on how you can do it… Here is a code that should work:

    function redirect_deleted_user( $user_id ) {
        if ( $user_id != get_current_user_id() ) {
            wp_redirect( 'https://www.example.com', 301 ); exit;
        }
    }
    add_action( 'delete_user', 'redirect_deleted_user' );

    This code goes to your functions.php file ( if you have a child theme ) if you don’t have a child theme, you’ll need one or your changes will get overwritten when you update your theme*).

    *To create a child theme you can use a plugin like Child Theme Creator by Orbisius (there are other plugins that are qutie similar with this one – here is a list

    So after you have the child theme, add the code to its functions.php file

    if you don’t want to create a child theme for this you can also add it as a plugin:

    for that create a file with the fallowing content (in notepad):

    <?php
    /**
     * Plugin Name: Deleted User Redirect
     * Plugin URI: https://URI_Of_Page_Describing_Plugin_and_Updates
     * Description: This plugin adds functionality to the blog, it redirects the user to a specific hard coded url when he/she deletes hes/hers account.
     * Version: 1.0.0
     * Author: Name of the plugin author
     * Author URI: https://URI_Of_The_Plugin_Author
     * Text Domain: redirect-deleted-user
     * License: GPL2
     */
    
    defined( 'ABSPATH' ) or die( 'No script kiddies please!' );
    function redirect_deleted_user( $user_id ) {
        if ( $user_id != get_current_user_id() ) {
            wp_redirect( 'https://www.example.com', 301 ); exit;
        }
    }
    add_action( 'delete_user', 'redirect_deleted_user' );

    Save this file as redirect-deleted-user.php in a folder named redirect-deleted-user create a zip of that folder. Go to your website backend to Plugins->add new plugin -> upload plugin and upload the new zip file then activate this plugin and everything should work.

    You have 2 ways of achieving this. In both cases the page the user is redirected to is hard coded in the script.

    You can create an options page for your plugin if you want to be able to change the page the user gets redirected when he/she delelets his/hers account throw options in backend, just check the codex for this.

    If you have other questions or you get errors or anything else please ask away and excuse my first answer I just thought it was enough for you to build a solution.

    Are you getting emails from you website at all?
    Have you checked your spam folder?

    Have you checked the database to see if the image gets inserted?
    The insert code doesn’t look corect. Please check codex page here to get a better idea on how wpdb->insert works.

    As in the codex page, you use it like:
    <?php $wpdb->insert( $table, $data, $format ); ?>

    From what I can see you code misses the $table in which the imag to be saved ($table and $data are mandatory!)

    Also usually tables associated to WordPress have a prefix so make sure your image is queried from the correct table clients vs wp_clients or other forms.

    Forum: Fixing WordPress
    In reply to: Page keeps updatng

    I don’t know why this happens in your case but here is an article that describes the matter and has good info:
    https://askleo.com/why-do-some-web-pages-never-finish-loading/

    Hi, I’ve just checked the codex for WP_Query and it seems you should use the category like:
    Display posts that have this category (and any children of that category), using category id:
    $query = new WP_Query( 'cat=4' );
    Display posts that have this category (not children of that category), using category id:
    $query = new WP_Query( 'category__in=4' );

    I’ve checked the links “Health”, “Recipes” but I see no pictures, have you made other modifications? is the issue fixed?

    Disable all plugins and switch to base theme, check how things are. Everything should be ok :).

    Then start activating plugins one by one while verifying what each admin sees.

    At the end activate your theme and check again.

    See which plugin or if the theme causes this.

    How many files did you ended up with? How did you converted the flash? by using some automatic service?

    Have a look at the end code get the css and js out of the final project (css needs to be inside <style></style> tags and js needs to be inside <script></script> tags after that you an add them using the mentioned plugin.

    I’m not familiar with the plugin you are using but I’ve added css, js, and php to wp by using Custom css-js-php plugin. Have a look at this one too.

    If you still have questions ask away!

    You can use the <a href="https://codex.www.ads-software.com/Plugin_API/Action_Reference/delete_user">delete_user</a> action on the codex page you’ll see this example:
    Example: Email Users Being Deleted

    function my_delete_user( $user_id ) {
    	global $wpdb;
    
            $user_obj = get_userdata( $user_id );
            $email = $user_obj->user_email;
    
    	$headers = 'From: ' . get_bloginfo( "name" ) . ' <' . get_bloginfo( "admin_email" ) . '>' . "\r\n";
     	 wp_mail( $email, 'You are being deleted, brah', 'Your account at ' . get_bloginfo("name") . ' is being deleted right now.', $headers );
    }
    add_action( 'delete_user', 'my_delete_user' );

    instead of sending an e-mail to the user check them not to be still logged in (if an admin deletes their email for example) and if they are not logged in redirect them…

    One simple way I think you can do it is to change/overwrite a css rule:
    In your stylesheet at line 708 you have something like:

    .aequusImage {
        float: left;
        display: inline;
        margin: 0px 20px;
    }

    this has to be overwritten so you can either create a child theme or add the css inline (if you have this optin) or use a custom css plugin to add the fallowing rule:

    .aequusImage {
        display: inline;
        margin: 0px 20px;
    }

    And that should do the trick. There are other solutions too.

    Forum: Fixing WordPress
    In reply to: Tablet View Issues

    You can use chrome view your website from a IPad point of view check this image to get there when you open chrome inspect mode on the left top corner you’ll see a small phone icon, click on that.

    I’d also advise you to debug your own code and not relay on others to do that.

    Congrats! I’m happy to hear you’ve managed to fix the issue!

    I don’t think you are going in the right direction.
    You should have screen options. Please check this image it will show you where to look for screen options (upper right corner)
    How did you created the CPT?

    If you are looking for the option to set an author for your custom post type then first you need to make sure that if the option exists it is also visible:
    Go to your backend and edit a listing CPT, then way top you should see a button called “Screen options” click that and you’ll get more check boxes see if any of them is for author if it is then make sure it’s checked and then look for an author settings options in your main article edit page.
    If the author check box is not available in the Screen options menu then you’ll have to edit the listings CPT registration code.
    For now check the options above and see if you can get what you need using the Screen options

    WordPress relaies on PHP mail() function to send emails so if that function is disabled by your host then a default WordPress installation won’t be able to send mails.

    To check if your host has disabled mail() function you can upload somewhere accessible on your server a php file containg the fallowing code:

    <?php if ( function_exists( 'mail' ) )
    {
        echo 'mail() is available';
    }
    else
    {
        echo 'mail() has been disabled';
    }

    This will tell you if the mail function is available or not, depending on this result there are different steps you’ll have to take.

Viewing 15 replies - 16 through 30 (of 871 total)