MartinCDS
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Updating WordPress Has Stopped Me Accessing Wp-AdminI had the same issue but when I renamed the plugin folder and then accessed wp-admin it gave me an option to update the db, when the database was updated I renamed it back and everything works now.
Forum: Plugins
In reply to: [Custom Post Type UI] Filtering the product category on a custom post typeOk so here is my final solution below. This will work just as well with Custom Taxonomies as long as the taxonomy is also attached to the products post type that Woocommerce uses.
<?php //retrieves the term variable from the admin page - replace "product_category" with the name of your post type $part_terms = get_the_terms( $post->ID, 'product_cat' ); if( $part_terms && !is_wp_error( $part_terms ) ) { foreach( $part_terms as $term ) { } } //create a variable to filter your WordPress Loop $part_args = array( 'post_type' => 'product', 'hierarchical' => true, 'posts_per_page' => -1, 'tax_query' => array(array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => array($term->slug), 'operator' => 'IN' )) ); $loop = new WP_Query( $part_args ); //the loop while ( $loop->have_posts() ) : $loop->the_post(); global $product; //some handy woocommerce coding echo '<div class="background-img"><a href="'.get_permalink().'">' . woocommerce_get_product_thumbnail().'<br /> '.get_the_title().'</a>'; echo $product->get_price_html(); echo '<form class="cart" method="post" enctype="multipart/form-data"> <input type="hidden" name="add-to-cart" value="'; echo esc_attr($product->id); echo '"> <button type="submit">'; echo $product->single_add_to_cart_text(); echo '</button> </form>'; echo '</div>'; endwhile; ?> <?php wp_reset_query(); ?>
Thanks for the feedback Michael.
Forum: Plugins
In reply to: [Custom Post Type UI] Filtering the product category on a custom post typeYes I am using your plugin, been through a few to try to wrap my head around the concept of Custom Post Types. Thanks for that link,I dabbled a bit and came up with the following:
$args = array( 'post_type' => 'product', 'posts_per_page' => -1, 'tax-query' => array(array( 'taxonomy' => 'product_cat', 'field' => 'slug', 'terms' => $cat )) ); $loop = new WP_Query( $args );
I’m not that good at PHP and that is why I have asked for assistance, perhaps someone can see something I am missing. It still outputs all the products and not only the ones I want listed.
Under add/edit post types – if you scroll down to the bottom in the section “Built-in Taxonomies” there is a checkbox for “Product Categories” – this is built in from Woocommerce – I need to know how to show the relevant products of that category – the slug is for the taxonomy is product_cat and the term needs to be whatever product category I have checked on the specific page for my custom post type.
Forum: Plugins
In reply to: [The Events Calendar] not allowing free bookings for Woo CommerceSorry, it’s working now lol *blush* how do I delete this?
Forum: Fixing WordPress
In reply to: Visual editor missing, buttons not working, white textI have something similar happening. This is what I get from the admin section of my consol log on Chrome:
Uncaught Error: no such method ‘instance’ for autocomplete widget instancen
.extend.error @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=42617d4……:2(anonymous function) @ jquery-ui.min.js?ver=42617d4…:5
n.extend.each @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=42617d4……:2
n.fn.n.each @ load-scripts.php?c=1&load[]=jquery-core,jquery-migrate,utils,plupload&ver=42617d4……:2
t.fn.(anonymous function) @ jquery-ui.min.js?ver=42617d4…:5
b.addButton.onPostRender @ wp-tinymce.php?c=1&ver=4308-20160323:56d @ wp-tinymce.php?c=1&ver=4308-20160323:22
i @ wp-tinymce.php?c=1&ver=4308-20160323:9v.fire @ wp-tinymce.php?c=1&ver=4308-20160323:9
v.postRender @ wp-tinymce.php?c=1&ver=4308-20160323:9
(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:9
n @ wp-tinymce.php?c=1&ver=4308-20160323:4
i.each @ wp-tinymce.php?c=1&ver=4308-20160323:9
i.exec @ wp-tinymce.php?c=1&ver=4308-20160323:9e.extend.postRender @ wp-tinymce.php?c=1&ver=4308-20160323:10
(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:9
(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:9n @ wp-tinymce.php?c=1&ver=4308-20160323:4i.each @ wp-tinymce.php?c=1&ver=4308-20160323:9
i.exec @ wp-tinymce.php?c=1&ver=4308-20160323:9
e.extend.postRender @ wp-tinymce.php?c=1&ver=4308-20160323:10
(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:9
e.extend.postRender @ wp-tinymce.php?c=1&ver=4308-20160323:14
(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:9
(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:9n @ wp-tinymce.php?c=1&ver=4308-20160323:4
i.each @ wp-tinymce.php?c=1&ver=4308-20160323:9i.exec @ wp-tinymce.php?c=1&ver=4308-20160323:9
e.extend.postRender @ wp-tinymce.php?c=1&ver=4308-20160323:10
(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:9
v.renderTo @ wp-tinymce.php?c=1&ver=4308-20160323:9
c @ wp-tinymce.php?c=1&ver=4308-20160323:42
(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:56
i @ wp-tinymce.php?c=1&ver=4308-20160323:9fire @ wp-tinymce.php?c=1&ver=4308-20160323:9
A.initContentBody @ wp-tinymce.php?c=1&ver=4308-20160323:12
A.init @ wp-tinymce.php?c=1&ver=4308-20160323:12(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:12
(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:5n @ wp-tinymce.php?c=1&ver=4308-20160323:4
p @ wp-tinymce.php?c=1&ver=4308-20160323:5(anonymous function) @ wp-tinymce.php?c=1&ver=4308-20160323:5
i @ wp-tinymce.php?c=1&ver=4308-20160323:5
I suspect the new release of Tinymce that ships with the latest release is not compatible with my theme. Will post more later, hopefully someone who knows their stuff can come up with a brilliant simple solution. Tried deactivating all the plugins and went through the suggestions above with no luck. Meh.
Forum: Themes and Templates
In reply to: Link color style not working within listsIn your stylesheet you first have your normal link definition listed and then you have another definition especially for lists. Go to line 1812 in your stylesheet and change the color to #2b9b9b
Forum: Fixing WordPress
In reply to: Working on two pages at once?You can work on more than one at a time. The only terrible thing that could happen is that you get things done faster.
Forum: Fixing WordPress
In reply to: Problems displaying webpage in office browsers?Hi Gladys, it could be an issue with your firewall on the network. Networks that break websites and browsers that are not upgraded are a small minority of users, so I would not worry too much about it. You need to speak to the person who does your networking as it is not acceptable that you cannot view these sites properly, it hampers your ability to do your work.
Try adding this inside your head tag in header.php:
<meta http-equiv="X-UA-Compatible" content="IE=edge">
It has solved the network issue for me in the past.
Forum: Fixing WordPress
In reply to: Website hacked by META HTTP-EQUIV REFRESHNice website. So here is what I do when I get hacked.
First backup everything – export your database and zip and download your files through your ftp account.
Access your website via ftp and see when last files and folders have been modified on your site. That should give you an idea of when the site was hacked – keep in mind dates when you updated the site and plugins as well. Go through your log files for that date and see where you find the word ‘POST’ and see which files were posted to – some of them will be your normal WordPress processes and some will be what the hacker put there. Write these filenames down and put them on side.
If you have a previous backup this would be a good time to restore that backup. Some hosting companies will allow you to roll back. If you are worried about losing content export your latest posts through your WordPress export tool – you can choose only the latest ones by assigning them to a new username and then exporting only for that user.
If you could restore a backup then immediately change your passwords as well as your username and password for your database – change your wp-config.php accordingly. Do not do it before this point as some hacks send new password changes and new user creations to the hackers automatically – you need to be sure the site is clean before doing it – otherwise leave this step to past.
Make sure you have Wordfence installed and configured as well as a plugin that protects you against brute force attacks. Jetpack has this as one of its built in features but there are others that will limit your xmlrpc.php functionality.
Make sure all your plugins, your theme and your WordPress version is up to date.
Run your Wordfence scan and see if there are any WordPress files that do not correspond with the current version. Wordfence may also find some other vulnerabilities.
Google the files mentioned in your log accessed on the date the site was hacked and see if there are any known hacks using those files and what the suggested method is to fix it.
I would recommend though that you find a developer to fix this for you as there are other things that could go wrong while updating and fixing the site. Try these steps but if you don’t come right restore the backup and get someone experienced to help you. If your developer is ignoring you find someone else to help you, this may be a good time for you to find someone more dependable.
Forum: Requests and Feedback
In reply to: Tags related to CategoriesTags are keywords that if you click on them you can filter through all your posts to see where that keyword appears, almost like a search without having to type the words. It is great for filtering through posts especially if you have a lot of content. You can find them in your right hand column when editing posts. You can make them whatever you want, the idea though is to create consistent tags throughout your blog to make it easier for users to find relevant information. It will also increase your organic SEO.
Forum: Fixing WordPress
In reply to: Featured images wrong sizedOK my bad, this option is not available with most themes – you will need to change the template file – probably single.php to pull the full width thumbnail instead of the medium width one – if you are not a coder you will need to get someone to do this for you. You can read about it here:
https://developer.www.ads-software.com/reference/functions/the_post_thumbnail/
There may be a setting somewhere in your theme that could do this for you, it is hard to tell without more information.
Forum: Fixing WordPress
In reply to: Certain plugin messes up layoutIt is not a major change, why not try using CSS to fix it? If you give me the link I will give you some custom CSS you can use to override the change.
Forum: Fixing WordPress
In reply to: Please help – increase amount of text shown in boxesTry pasting this into your functions.php file:
function wpdocs_custom_excerpt_length( $length ) { return 20; } add_filter( 'excerpt_length', 'wpdocs_custom_excerpt_length', 999 );
Replace the 20 with the amount of characters you want to use. There is more information in the codex:
https://developer.www.ads-software.com/reference/functions/the_excerpt/Forum: Fixing WordPress
In reply to: Featured images wrong sizedWhen you insert them you can choose the size – you are currently choosing the medium option – try the full size option.
Forum: Fixing WordPress
In reply to: Unable to create directoryYour folder settings need to be set to 755 and your files need to be set to 644 in order for them to function correctly. Contact your hosting company and ask them to set it correctly for you. Also make sure that you have enough space on your hosting account. If those are set correctly it could be that your WordPress user does not have the correct permission to write to those files.