RossMitchell
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Simple text change on price rangeLook for the woocommerce template that creates the price phrase. It has a span element with a class of “price”. Most likely it will be in your theme somewhere, but could be in the woo plugin itself. To change it you need to create a child theme, copy the template file and customise it.
As an alternative to customising the template, you may find that there is a filter available.
Looks like someone beat me to it while I was writing my reply. Such is life.- This reply was modified 4 years, 11 months ago by RossMitchell.
Forum: Fixing WordPress
In reply to: Error 404 nginxSuggest consulting siteground support.
Your website page looks ok to me, I can also load http://jawadgp.com/readme.html
which is also a good test.
Have you tried a different browser or computer, it may be a cache problem.Forum: Fixing WordPress
In reply to: Nginx and wordpress and database on seperate serversThis looks a lot more like a NGINX configuration question than a WordPress question. Suggest seeking support in the nginx community as well.
Forum: Fixing WordPress
In reply to: product variationsHave you done an update recently ?
Suggest asking in the relevant plugin support forum to access their specific expertise.Forum: Fixing WordPress
In reply to: I need an eye friendly themeOne option is to customize your present theme.
Maybe you can manage the required changes in the Customizer > Additional CSS.
BUT if this is not enough then create your own child theme and do the color customization in the styles.css file in the child theme.When you do this please be sure to extensively test your site, I once inherited a site with an extensively customized theme that had been changed from light to very dark background, for ages after I was finding elements such as country dropdown lists that had unusable combinations of inherited and customized text and background colors, like yellow on white etc.
Forum: Developing with WordPress
In reply to: Using $wpdb prepare and IN argumentCurious that the numbers are being quoted. Suggest minor change to:
$alist = ''; $sep = '%d'; foreach( $i in $array ) { $alist .= $wpdb->prepare($sep, $i ); $sep = ', %d'; }- This reply was modified 4 years, 11 months ago by RossMitchell.
Forum: Fixing WordPress
In reply to: how hackers manage to find login page ?See what you can learn from your webserver access logs.
Forum: Developing with WordPress
In reply to: Using $wpdb prepare and IN argumentThe problem is that the IN phrase is taking a variable number of parameters and the prepare statement is not matching the array to it.
In your example you are presenting the list of three post ID numbers in code, you are sourcing it yourself, in this case you could just code it yourself in a string and incorporate it into prepare as one argument. BUT I suspect that your real use sources the ID numbers from potentially unsafe sources, hence the need for prepare. IF this is the case you I would loop through the array and assemble the list like this:`
$alist = ”;
$sep = ”;
foreach( $i in $array) {
$alist .= $wpdb->prepare(‘%s %d’, $sep, $i );
$sep = ‘,’;
}
$id = $wpdb->get_var(
$wpdb->prepare(”
SELECT ID
FROM {$wpdb->prefix}posts
LEFT JOIN {$wpdb->prefix}postmeta
ON {$wpdb->prefix}postmeta.post_id={$wpdb->prefix}posts.ID
WHERE ID IN ($alist)
AND meta_key = %s
AND meta_value = %d
“,
$key, $value
)
);`
You need to sort out what is expected if the list is empty.Forum: Developing with WordPress
In reply to: Recommend a starter WP plugin with a settings page?When I was getting started I found this plugin very informative:
https://wordpress.org/plugins/wp-csv-to-database/- This reply was modified 4 years, 12 months ago by RossMitchell.
Forum: Localhost Installs
In reply to: new post do not get displayed in the outputDo the post appear in other displays, pages which use regular templates from your theme rather than ones you wrote yourself ? Say the categories one.
Are the posts published etc, just like the demonstration post ? Open the demo and one of yours in the posts editor and see if anything is missing or different.
Add some of your own output so you can see that your template is really getting accessed, something like:<php echo '<p>Location A</p>';?>and so on.- This reply was modified 5 years ago by RossMitchell.
- This reply was modified 5 years ago by RossMitchell.
Forum: Fixing WordPress
In reply to: Could not open my localhost site website after reinstalling xammpWhen you reinstalled xammp it reinstalled your mysql and hence you have empty databases.
Do you have a database backup ? In which case reload it.
Maybe the old databases are recoverable, but this is not a WordPress issue, it is about xammp and mysql. Suggest seeking support from your xammp source.Forum: Fixing WordPress
In reply to: WP_NONCE in URLTry leaving the nonce out of the URL, what happens, does it still work ?
Forum: Fixing WordPress
In reply to: WP_NONCE in URLThese are security mechanisms, used to ensure the integrity of transactions and sessions, it prevents old actions from being replayed. Do they give you any specific problems, or is it just their messiness ?
NONCE = nonsence used once, changes for every session.
Almost certainly they come from one of your plugins, very likely after you did an update recently.
The only way I can think of not having them in your URL is to have the nonce put into a form as a hidden field, or as page parameter somehow. This would be a significant job.
Forum: Developing with WordPress
In reply to: Change font size of product add-on title in woocommerceIt would have been helpful if you included the extra instructions in your first post.
Try this css:.woocommerce-variation-add-to-cart .za-variation-section .zaddon-type-container h3 { font-weight: 700; line-height: 2em; color: #3a3a3a; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen-Sans,Ubuntu,Cantarell,Helvetica Neue,sans-serif; }This could be put in the style.css of your child theme, but is best and most easily placed in the customizer. Log into your WordPress dashboard, navigate to this page. In the top left it will have XUSTOMIZER. Click it and browse down to “Additional CSS”, add the above snippet of css there. Include a comment saying what it does and when you added it.
Forum: Fixing WordPress
In reply to: Hamburger menu not working on mobileSuggest also asking the support forum for your theme.
Also check the website error logs, enable debugging, I have seen javascript error do things like this.