Forum Replies Created

Viewing 15 replies - 16 through 30 (of 114 total)
  • Forum: Fixing WordPress
    In reply to: Cutting a post

    To be honest you might want to consider re-structuring your WP setup to include some more structure:

    You could easily have some custom fields:
    Summary
    Link

    Then you have full control of what shows in parts of your template e.g. you can output a summary then output the link right under it.

    Forum: Fixing WordPress
    In reply to: Can't login

    Are you an administrator?

    If you can do this:
    https://make.wordpress.org/support/user-manual/customizing-wordpress/managing-users-on-your-wordpress-site/adding-users-to-your-wordpress-site/#adding-users

    add a new admin user and write down the password and keep it safe. Try logging in as that user on another PC.

    Then you know you have access you can maybe change your own password to something else.

    If you don’t have the options above you can try the password reset process but i’d be careful with that try the above first.

    Forum: Fixing WordPress
    In reply to: Cutting a post

    Well the problem is substr is a pretty basic function stripping 300 chars could land you in the middle of an HTML tag or not closing one which is bad times which is why i added it in there.

    Its not an easy problem :D. Bit of google and someone has this function you could maybe use instead:

    http://stackoverflow.com/questions/2398725/using-php-substr-and-strip-tags-while-retaining-formatting-and-without-break

    Other than that some other members might chime in.

    Forum: Fixing WordPress
    In reply to: Cutting a post

    In the theme where the content is outputted you likely have the_content()

    You could change this to:

    echo(substr(strip_tags(get_the_content()), 0, 100));

    where 100 is the number of characters you want to output.

    Forum: Hacks
    In reply to: delete custom post metadata

    edit: deleted already replied to

    You could also change your local host file to direct all traffic from the web to localhost if you want to keep the DB the same:
    http://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/

    Just remember to set it back at some point if you need to!

    Oh yea i know that pain, had a few woo themed sites that were a mess!

    Tend to use the old mantra of ‘its gonna cost more to fix than it will do to start again’ tends to work for us :D.

    It can be tricky with debugging because like any open source platform WordPress is extended by a series of 3rd party plugins which are for the most part independent of each other.

    Unsure of your php knowledge but we take the approach of this for plugins:
    – Can we code what we need to do using WP and its core functions easily? yes ok dont look for a plugin do it
    – Is it massive and we don’t have time, ok look for a plugin but ensure its been updated a lot and used by a significant number of users
    – Ensure we have the auto updates in place for both WP and plugins in the functions file.

    WP is great with plugins and themes but experience has taught me you should try to have as few plugins as you can.

    For most sites all I ever use is literally:
    acf-repeater
    advanced-custom-fields
    contact-form-7
    contact-form-7-to-database-extension
    bulk-resize-media
    tinymce-advanced
    resize-image-after-upload
    redirection
    wordfence
    broken-link-checker
    better-search-replace
    wordpress-seo

    using a custom theme built from scratch with functions etc built over time

    Hate to say it but have you thought about creating a staging version of each site to do debugging on if effects to production are not acceptable its generally good practise to do this.

    For the contact forms have you tried contact form DB? It stores a copy of the form response. This first step will let you know if the form is submitting properly and allow you to debug if its another setting / SMTP issue.

    Forum: Fixing WordPress
    In reply to: Images not showing

    Basically when you upload an image e.g.
    web_WOMBAT-WARRIORS-400.jpg

    Depending on how wordpress is setup it created a series of resized versions for optimisation and renames them e.g. in this case:
    web_WOMBAT-WARRIORS-400-400×289.jpg

    The option might be if you are happy to take the performance hit is to edit your theme template to use the original image not a resized version.

    Its tricky since your media is uploaded into date based folders, some other members might have some tricks. Looks like you use a couple of additional sizes:
    120×67.jpg
    400×289.jpg

    You could i guess change wordpress to not use date based folders for media in settings.

    Upload all your missing images (which will create a big list with the resized versions) you can then change it back to date based and FTP in and move the 3 versions of each file to the correct date.

    Its a faff and you should know media in WP only appears in the media library owing to an associated database entry (like posts) so the above solution creates an issue whereby you’ll have duplicate entries in the DB for the images e.g. the orignals and the ones you just uploaded to replace them.

    I better option might be to use an image resizer desktop application to resize all you lost images and auto-rename them as needed then FTP them up.

    As i said other members might have a better solution as you can realise your issue is actually 3x worse than you thought 🙁

    If you want to get your hands dirty you could look at actions in your functions.php file e.g.

    function myfunction($post_id) {
    
        $posttype = get_post_type($post_id);
        if($posttype == 'whatever'){
        //do stuff
        }
    }
    
    add_action( 'save_post', 'myfunction' );

    You could try rewrite rules in .htaccess there are a number of tutorials online about this. Be careful with this though as WP has its own rewrite rules in place.

    A simple manual way to do it is setup redirects using this plugin:
    https://wordpress.org/plugins/redirection/

    e.g.
    /toto
    301
    /member/?member=toto

    It would end up loading the second url in the address bar and you’d need to do this manually for each member so maybe a bit of a dodgy solution.

    Another out of the box way would be to modify your 404.php file to check if the address is a member’s name then instead of producing a 404 access the post or redirect them on, this isn’t really a great way to go about it though.

    Did you check the failed login attempts panel in wordfence?

    If you are getting a lot of failed logins then i’d suggest you move your login url (good practise anyway) using the likes of:
    https://wordpress.org/plugins/wps-hide-login/

    Also if you don’t use it give disabling xmlrpc.php in .htaccess

    <Files "xmlrpc.php">
    Order Allow,Deny
    deny from all
    </Files>

    Hi

    its a simple couple of lines in the .htaccess file in the root of the site:

    RewriteCond %{HTTP_HOST} !www.sitename.com$ [NC]
    RewriteRule ^(.*)$ https://www.sitename.com/$1 [L,R=301]

    If you have no access to .htaccess you can achieve a similar result in php in the theme’s functions.php file.

    if(empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == "off"){
        	$redirect = 'https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
        	header('HTTP/1.1 301 Moved Permanently');
        	header('Location: ' . $redirect);
    	}
    }

    Sounds like you are getting hit hard by some sort of bot.

    WordFence is good even if you uninstall it after a period of time. Check out it’s live traffic feature.

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