RossMitchell
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: How to override WP default menu cssYou need to learn how to use your browser inspector to show you which css is active and where it comes from. Since you are using your own theme you have complete control of your css, in WordPress the styling comes entirely from your theme and child theme, there is no default WordPress theme behind it.
Suggest that you add your menu style using the Customizer > Additional CSS, this will get it placed very late in the css delivery chain, also you may need to make your css more specific using classes and IDs of enclosing elements, the browser uses rules that weigh your css to determine which get applied.Forum: Localhost Installs
In reply to: Update wordpress: Fatal error maximum execution time 120 secondsMost likely the update is failing because the localhost setup files (and directories) do not have the correct file permissions for the auto update to work.
Rather than fix these fiddly problems, the easiest solution is to download and install the WordPress update manually.Forum: Fixing WordPress
In reply to: Emails not being sent (error)Suggest that:
– You talk to your website hosting technical support.
– Try a different SMTP pluginForum: Fixing WordPress
In reply to: Can’t login: Cookies are blocked due to unexpected outputYou easiest solution is to update your WordPress version.
First make a backup of your present site, both files and database.
Then update all your themes and plugins. Then update your WordPress.
An alternative would be to revert to an earlier PHP version, but there is no future in doing that.
Updating WP will fix your first error, and most likely the second one will then go away too.Forum: Developing with WordPress
In reply to: How do I load Javascript on specific pages only?An expedient way to do this would be in a page template.
You need to be using a child theme. Copy a basic page template from the parent theme into your child theme directory. Do your customisations there. Nominate this as the template to be used on your special pages.
I am sure that there are more elegant ways to do this, but this will get you there.Another option:
– Create this extra menu in Dashboard: Appearance > Menus
– Register a shortcode which invokes this menu
– Place this shortcode in the desired pages and posts.Note that shortcodes can take arguments which may help with the title aspect of your menu block.
Forum: Developing with WordPress
In reply to: Linking subdomain to main siteYou can add links to any website in your menus.
On you dashboard navigate to Appearance > Menus, choose your desired menu. Use the control on the left for “Custom Links”, fill in the address of your subdomain. Similarly on your subdomain add links back to the main site.Just create a block of html that creates your menu block for one page. Then copy and paste then customise for the other pages. The text in the h2 and the placement of the class=”bold” are the major change. Something like:
<span class="menublock"> <h2>Hand Protection</h2> <ul> <li><a href="page link here">Overview</a></li> <li class="bold"><a href="page link here">Hand Protection</a></li> <li><a href="page link here">Face Mask</a></li> <li><a href="page link here">Sexual Wellness</a></li> <li><a href="page link here">Dental Care</a></li> <li><a href="page link here">Others</a></li> <li><a href="page link here">Home Care Products</a></li> <li><a href="page link here">Personal Care</a></li> <li><a href="page link here">Product & ISO Certification</a></li> </ul> </span>You will have to code all the page links only once, most tedious part of this project.
And have css like this (I leave it to you to fill in the details):
span.menublock { /* set height, set text color, set background color, set margins + padding */ } .menublock h2 { /* center, big font, convert to caps */ } .menublock ul { list-style-type:none; margin: 0; } .menublock li { /* stack horizontally */ display: block; float: left; } .menublock li a { /* style the links */ text-decoration: none; } .menublock li.bold { /* make bold */ } .menublock li+li::before { /* if the li element is preceded by a li then place the separator */ color: #222; content: "|"; }- This reply was modified 5 years, 1 month ago by RossMitchell.
Forum: Developing with WordPress
In reply to: Disabling “Mobile Site”?Here is how to make a child theme:
https://developer.wordpress.org/themes/advanced-topics/child-themes/
However there are situations where this is not viable, for example there are commercial child themes, and since there are no grandchild themes something else is required:
https://github.com/woothemes/theme-customisationsYou can test mobile view on a browser by making the browser smaller. On firefox you can also use a testing mode activated by Ctrl+Shift+M
You also need to make friends with your browser inspector, each browser has one to assist developers. It shows how yout html and css are working.
Forum: Developing with WordPress
In reply to: Disabling “Mobile Site”?Curious since storefront is responsive, its mobile view works well.
What customisations have you made ?
Are you using a child theme ?If you are determined to disable the mobile view you could:
– create a child theme.
– copy the style.css file from the storefront parent theme and hack it by removing all the media queries that change the css for narrower screens.
Not saying I think it is a good idea, but it is what you ask.Forum: Localhost Installs
In reply to: Publish Internal WP Site ExternallyYes it is possible to publish your site outside of your network, well probably.
However the popular wisdom is that your really do not want to do this, exposing your server to the wild world of the internet can be very demanding upon it and demanding of your server security and support staff.What you really need to learn is how a browser loads a webpage, this is not about WordPress. Initially a browser requests a page from your server, your server delivers an HTML document. The doc contains the text of the page and web addresses of supporting components such as images, background images, javascript and CSS files. The browser must use these to fetch the rest of what it needs, since you are getting “name not resolved” errors, it means that these requests are failing. WordPress uses the home address and site address to create these web addresses of support components. Use your browser inspector to look at these addresses. The reason your form bits are all stacked up is that your browser was unable to fetch the required css file etc.
So this is what you need.
You must have a fixed IP address assigned to your internet gateway, say it is “a.b.c.d”. You could put this into your site and home addresses, but it is more conventional to use the domain name system to map the name to this IP.
On your gateway you forward the required ports to your webserver LAN address, ports are 80 for http and 443 for https.
Then you need to make sure that on your LAN side that the forwarding works there too.
Not sure how cloudflare changes anything.Forum: Developing with WordPress
In reply to: Creating duplicate testing them for devThe way I deal with client approvals is to develop on my localhost and have the client use a remote desktop program such as ANYDESK or TEAMVIEWER to view my screen.
– I get them to install the software.
– Get them on the phone, the voice connection is maintained through the session.
– Get the development website up on my browsers.
– Have the client connect and remote view the development website.
– Demonstrate the changes and features, also have them browse the site using their remote mouse + keyboard.
– All the time I am keeping notes on what they say and do, how they react etc. This gives me control and supervision of their exploration, I also know just what they did and saw.
– Close the remote session and wind up the phone conversation.I have also done this on the live site when making minor changes such as a holiday announcement in some widget text, Also done user training on how to use their website admin and product management.
Forum: Developing with WordPress
In reply to: Creating duplicate testing them for devYou have two options:
– At your website hosting, register a subdomain to your site’s domain.
Give the subdomain its own home directory, the default is to make it a sub directory of the domain but this can be overridden.
Get the letsencrypt certificate for the subdomain.
Make the directory of the sub domain password protected so that only you and authorised people can access this dev site.
Use the plugin DUPLICATOR to copy the parent website to the subdomain.– Setup a localhost webserver.
Configure it to use the VirtualHost method on the same domain name as your website.
Add a line to your hosts file to map your domain name to the localhost server, you can switch between using the localhost vs hosted site by commenting out this line.Forum: Localhost Installs
In reply to: Restore WordPress Backup on Local ServerIf you were using Apache2 I could give you pointers on configuring a VirtualHost and so on. However you are using IIS, there may be assistance available somewhere else on this. But wait, the reason your IT division bought iis is because then they would have support, get back to them.
Forum: Developing with WordPress
In reply to: Trying to change single product page to 1 columnFirst I need to address some issues:
– The link you gave is for a theme which is different to the one you are using, theses vary in how they are organised.
– You must never ever edit your theme files because your changes will be lost when your theme is updated. Rather you must configure a child theme, and put your changes there.Now to address your problem.
You are wanting to modify the template that woocommerce uses when displaying your single product pages. Woocommerce looks for a template in this order:
– your child theme (if you are using a child theme)
– your theme
– the woocommerce plugin
The only one you should change are in the child theme, if you change any others your changes will be lost when an update is done.
So your challenge is to find which template is being used, copy it to your child theme and modify it there.It may be possible to make your change in CSS or by using a filter, but this is likley to be tricky.