Forum Replies Created

Viewing 11 replies - 1 through 11 (of 11 total)
  • Thread Starter HairLoss57

    (@hairloss57)

    OK, it is ugly but I appear to have found a solution.

    In the apache config file;

    DirectoryIndex /wordpress/index.php

    has been changed to

    DirectoryIndex index.htm

    Additional directives were added;

    <Directory /var/www/vhosts/mydomain.com/httpdocs/wp>
    Options +ExecCGI
    DirectoryIndex index.php
    </Directory>

    <Directory /var/www/vhosts/mydomain.com/httpdocs/wordpress>
    Options +ExecCGI
    DirectoryIndex index.php
    </Directory>

    An index.htm document was added to the root directory with a redirect to send live users to /wordpress/index.php

    In the dev site the pretty permalinks had to be set to the default – mydomain.com/wp/?page_id=2

    Live users get directed to the live site when they type in the domain, I can access my development site simply by adding /wp onto the domain.

    I have been able to logon and create a couple of pages and to see these via the web.

    I anyone knows of a tidier solution please let me know but this will do for now.

    Cheers.

    • This reply was modified 6 years, 7 months ago by HairLoss57.
    Thread Starter HairLoss57

    (@hairloss57)

    When I change

    DirectoryIndex /wordpress/index.php

    to

    DirectoryIndex index.htm

    I can no longer run the script /wordpress/index.php – you do not have permission..
    Yet I can run /wordpress/hello.php. Both files have exactly the same permissions, owners and group.

    This is probably an apache issue but if anyone here knows the answer I would be grateful to here.

    Thanks.

    Thread Starter HairLoss57

    (@hairloss57)

    I think I see the problem. My sites are running on a VPS and each domain has it’s own Apache config file. I see in the config file that there is the line;

    DirectoryIndex /wordpress/index.php

    So I guess whatever calls the domain is going to get shunted into the /wordpress directory of the live site and not the /wp directory of the dev site.

    I will ponder a solution.

    Thread Starter HairLoss57

    (@hairloss57)

    Hi Nastia,

    Thanks for your prompt reply. I have tried both solutions but unfortunately without success.

    What do you think is happening to cause the redirect to the live site?

    Thanks.

    Thread Starter HairLoss57

    (@hairloss57)

    I should have added that I tried different browsers and cleared cookies and cache but to no avail.

    Thread Starter HairLoss57

    (@hairloss57)

    I have found the problem, it is a JavaScript conflict.

    When the Customizer is used it opens the website in a frame alongside the menu. I have javascript in the website that adds the post ID to each menu item so that the current page menu item can be correctly highlighted when more than one page has been used to make the front page.

    Unfortunately something in WordPress admin pages is trying to build some javascript before the IDs have been allocated to the menu items.

    I get this error in the debugger;
    Uncaught Error: Syntax error, unrecognized expression: #kf-menu-?customize_changeset_uuid=d93c176c-a1e7-4a2a-956d-a311dc820382&customize_theme=twentyseventeen-child&customize_messenger_channel=preview-0

    When I remove my menu customisation JavaScript the error goes and the Customizer is able to load the ‘Theme Options’ menu item.

    Thread Starter HairLoss57

    (@hairloss57)

    PS I have tried de-activating plugins, setting all pages to draft and then re-publishing and swapping themes but to no avail.

    Hi Jane,

    This is the way I have set up my child themes;

    A child theme directory must be created that sits in the same directory as the parent theme. It must have the same name as the parent but with ‘-child’ appended. E.g.
    ……./wp-content/themes/twentyseventeen-child.

    WP will not recognise a child theme until the directory twentyseventeen-child contains a stylesheet named style.css The style sheet must contain certain header information, e.g.

    /*
    Theme Name: Twenty Seventeen Child
    Theme URI: https://newvoo.com/wp-content/themes/twentyseventeen-child
    Description: Child theme to customise newvoo.com website
    Author: Mark Dressel
    Author URI: https://newvoo.com/
    Template: twentyseventeen
    Version: 1.0.0
    License: GNU General Public License v2 or later
    License URI: https://www.gnu.org/licenses/gpl-2.0.html
    Tags:
    Text Domain: twentyseventeen-child
    */

    In the child themes style.css file we put style rules to override the parent themes styles, but unless told otherwise WordPress will ignore the stylesheet in the parent theme and use only the child theme stylesheet. So to keep the parent theme css we must put some code in a file named functions.php loaded into the twentyseventeen-child directory.

    function enqueue_theme_resources() {
    // NOTE get_template_directory_uri() is path to parent theme,
    // get_theme_file_uri() is path to child theme.
    // Call the parent style sheet so we have both parent
    // and child style sheets.
    wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
    }
    add_action( ‘wp_enqueue_scripts’, ‘enqueue_theme_resources’);

    Adding this CSS rule to the child theme style sheet will show if the child theme is being used;
    .site-title:before{
    content: ‘using child theme’;
    }

    I hope this helps, though you may already have been through these steps.

    Thread Starter HairLoss57

    (@hairloss57)

    Hi Jess,

    Thanks for your reply.

    I did pretty much as you described earlier today and got WPForms working. I turned of all the plugins and then turned them on one by one, starting with WPForms, and it now works. I haven’t noticed any problems with the other plugins either.

    Am I correct in thinking that the second lot of light blue buttons – were they called Fancy Inputs? – do not work in the free version? If I drag any of those inputs onto the form I just get the endlessly rotating cog-wheel. After spending some time trying to get them working I finally wondered if the light blue buttons were ‘grayed out’? I looked on your website but could not see a list of features for the free version and finally found a review that said they only work on the paid version. It was a bit irritating that no message came up to say that they only work on the paid version, it would have saved me some time.

    I decided to finish my own contact form plugin but will look again at WPForms if I need something more complex.

    Cheers,
    Mark

    Thread Starter HairLoss57

    (@hairloss57)

    Thanks mrcangrejero, I learnt the hard way too. I couldn’t understand why the template was not being used when it was showing as selected in the admin panel. But the more I followed the code through the more it became obvious that the template wasn’t being called. It would be good if the drop down list for selecting templates was hidden when the pages are linked into a single page.

    • This reply was modified 7 years, 3 months ago by HairLoss57.
    Thread Starter HairLoss57

    (@hairloss57)

    I tried to instal the twentyfourteen theme again this morning (10am UK time) and am pleased to say it was succesful!

    I have lost my right hand sidebar but I am sure I can re-instal that without too much hassle.

    A good start to the day! ??

Viewing 11 replies - 1 through 11 (of 11 total)