Forum Replies Created

Viewing 15 replies - 61 through 75 (of 84 total)
  • Brian

    (@briansteeleca)

    Hi Tony, I’m not sure what image and caption you’re referring to – can you be more specific?

    Brian

    (@briansteeleca)

    The amr shortcode any widget allows you to add a widget to a page or post.

    You may be able to accomplish what you want with custom CSS though. If you send me a link to a page with an image that’s not displaying how you want, I may be able to help.

    Brian

    (@briansteeleca)

    A friend that will help you sounds perfect! I’ve heard good things about BackupBuddy, so it sounds like a good solution.

    This is obvious, but worth saying: make sure you have a working backup before you begin and you should be fine.

    Brian

    (@briansteeleca)

    Yes Ella, you should download all of the files in the public_html folder.

    I’ll be at a birthday dinner tonight, but I’ll be free later tomorrow and next week. Or maybe someone else may chime in.

    Can I ask who hosts your current site and what the web address is?

    Brian

    (@briansteeleca)

    Hi Ella,

    Assuming that you’ll be making a copy of your existing site on the same server, here is an overview of what you’ll need to do:

    1. Download your existing site files from the remote server.
    2. Export your database – go in to mySQL and export the database as SQL.
    3. Move the backed up files and database into a new folder on your local computer – somewhere safe – this is your site backup.
    Again, on the remote server:
    4. Create a new database for your new site.
    5. Import the SQL backup from your original site into the new database.
    6. Create a new directory for your new site in the public_html or www directory.
    7. Upload all of the files that you downloaded from your original site into your new directory.
    8. Edit the new site’s wp-config.php with the new site’s mySQL database name, user and password.
    9. Upload the Search and Replace for WordPress Databases Script to the root directory of your new site. (This is the new directory that you created.)
    10. Point your new domain to the new directory that contains the files for your new site. You can probably get help with this from your hosting provider. You will have to wait for the new domain to resolve before you can continue with the next step.
    11. Follow the Search and Replace script instructions – you’ll use the script to replace your original site’s URL with the URL for the new site. For example, replace example.com with example-new.com
    12. Be sure to follow all the instructions and delete the Search and Replace script when you’re finished with it.
    13. Log in to the admin panel of your new site: https://www.new-example.com/wp-admin – it will be the same username and password as the original site.
    14. Go to Settings > Permalinks and click the Save button

    You should now have a brand new site that is a copy of your original site. If you get stuck or have any questions, just ask.

    Brian

    (@briansteeleca)

    I just noticed that my link to the codex article is broken. In case you can’t find it, here’s the correct link: Moving WordPress

    Brian

    (@briansteeleca)

    This Codex article will explain how to copy your site:
    Moving WordPress

    Since you want to keep both sites running for a few weeks, you’ll have to treat them as independent sites, each having its own database.

    If you’re copying to a new server, then Changing Your Domain Name and URLs should be the steps you need.

    If you’re copying on the same server, you’ll need a hybrid of Changing Your Domain Name and URLs and Moving Directories On Your Existing Server.

    Please have a look and let us know if you have any questions.

    Forum: Fixing WordPress
    In reply to: Add Javascript?
    Brian

    (@briansteeleca)

    I would say don’t close it – a space character following the final closing ?> can cause problems such as “Warning: Cannot modify header information – headers already sent”. See Should You Close Your PHP Code Tags?

    In a case of a page template where you’re mixing php with html, you close it before continuing with your html:

    <section id="<?php $content->slug(); ?>" class="contact">
    	<div class="row">some content</div>
    </section>

    Forum: Fixing WordPress
    In reply to: Add Javascript?
    Brian

    (@briansteeleca)

    You’re welcome, good luck with the JavaScript!

    Forum: Fixing WordPress
    In reply to: Add Javascript?
    Brian

    (@briansteeleca)

    What I’m suggesting is that you completely remove all of your existing JavaScript code and replace it with this:

    jQuery(document).ready(function(){
      alert( "clientlogin script loaded!" );
    });

    The only thing it will accomplish is a popup alert to let you know that clientlogin.js script is loading correctly. Once you know it loads, you can remove the code and start writing your own. ??

    There’s only one important thing that I changed in your php function: get_template_directory_uri() is changed to get_stylesheet_directory_uri(). The later will
    “Retrieve stylesheet directory URI for the current theme/child theme.”
    as opposed to the parent theme.

    As for the function name in my example – your_childtheme_name_scripts – you can call it anything you want, but try to name it something that describes what it does, and follow the WordPress naming conventions. Then, when you add your action hook, be sure to use the same function name so that it adds your function.

    Brian

    (@briansteeleca)

    Have you tried enabling debugging in your wp-config.php file? That may provide some useful information as to where it’s failing.

    Brian

    (@briansteeleca)

    I’m sorry my suggestion didn’t work, but I’m glad you were able to get the www redirect working.

    If your other domains are pointing to the same instance of your site, you could try redirecting them separately in the same way if you’re concerned about SEO:

    #RewriteCond %{HTTP_HOST} ^www\.goldenhours\.org$ [NC]
    #RewriteRule ^(.*)$ https://omnimedianetworks.org/$1 [R=301,L]
    
    #RewriteCond %{HTTP_HOST} ^goldenhours\.org$ [NC]
    #RewriteRule ^(.*)$ https://omnimedianetworks.org/$1 [R=301,L]
    
    #RewriteCond %{HTTP_HOST} ^www\.omnimedia\.org$ [NC]
    #RewriteRule ^(.*)$ https://omnimedia.org/$1 [R=301,L]
    
    #RewriteCond %{HTTP_HOST} ^omnimedia\.org$ [NC]
    #RewriteRule ^(.*)$ https://omnimedianetworks.org/$1 [R=301,L]
    Forum: Fixing WordPress
    In reply to: Add Javascript?
    Brian

    (@briansteeleca)

    There’s a couple issues here.

    I’m not saying this in a negative way, but I think you’ll have to learn some basic JavaScript if you want to get this working yourself. JavaScript 101: Hello World! may be a good place to start. You may also want to check out The Best Way to Learn JavaScript, or JavaScript 101. Unfortunately that’s beyond the scope of this forum.

    The first problem is that you don’t put <script> tags in an external js file – that’s only for scripts that are in html documents. I also doubt that just transferring the JavaScript from the other site is going to work as is – you probably have to do some rewriting.

    So let’s just deal with getting WordPress to load an external JavaScript file. Using jQuery, we’ll create a script that alerts you when the script has loaded to see that it’s working. Put this in your clientlogin.js file:

    /wp-content/themes/your-childtheme-name/js/clientlogin.js

    jQuery(document).ready(function(){
      alert( "clientlogin script loaded!" );
    });

    The second issue is that your redeclaring a php function that has already been declared. I suspect this is because you made a copy of your parent theme’s functions.php file and put it in your child theme. What you want to do instead is create a brand-new functions.php file in your child theme and put your hook in there:

    /wp-content/themes/your-childtheme-name/functions.php

    <?php
    
    /**
     * Proper way to enqueue scripts and styles
     */
    function your_childtheme_name_scripts() {
    	wp_enqueue_script( 'clientlogin', get_stylesheet_directory_uri() . '/js/clientlogin.js', array('jquery'), '1.0.0', true );
    }
    add_action( 'wp_enqueue_scripts', 'your_childtheme_name_scripts' );

    So try that and see if you can get your JavaScript file to load and alert you, and then if you’re up for it, go learn a bit of JavaScript to make the script do want you want! ??

    Brian

    (@briansteeleca)

    A disclaimer: this isn’t my area of experise, so please don’t treat this a definitive answer, but with a bit of research, this is what I was able to get working:

    Before making any changes to your .htaccess file, please back it up!

    # Redirect to preferred url - omnimedianetworks.org
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{HTTP_HOST} !omnimedianetworks.org$ [NC]
    RewriteRule ^(.*)$ https://omnimedianetworks.org/$1 [R=301,L]
    
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    You want to leave what’s between # BEGIN WordPress and # END WordPress intact – this is what WordPress uses for rewriting permalinks – so you can put your redirect rules above that.

    This will redirect any request to https://omnimedianetworks.org (including https://www.omnimedianetworks.org), but it still doesn’t solve the original problem – why https://www.omnimedianetworks.org isn’t working.

    You mentioned that you had to modify a file to change you site address settings back – did you notice this problem before or after you made that change?

    Forum: Fixing WordPress
    In reply to: Add Javascript?
    Brian

    (@briansteeleca)

    That explains a lot… Glad to know I’m not going crazy. ?

Viewing 15 replies - 61 through 75 (of 84 total)