Josh
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: add_object_page is deprecated since version 4.5.0Okay, apologies. I thought you were “error logging” in a different way.
With “WP_DEBUG_LOG”, the file is saved in the “wp-content” directory. The filename should be “debug.log”. You can read more about it on the WordPress Codex for Debugging.
BUT… If you are seeing these errors on your dashboard, then you don’t really need to look at the debug log file. The error will stop displaying in your dashboard whenever the faulty code is removed/deactivated.
Forum: Fixing WordPress
In reply to: Fatal ErrorGreat! Glad you got it figured out.
If the theme developer is actively attempting to keep the theme current; I would suggest filing a support ticket with the theme vendor. I’m sure they would be appreciative.
On the other hand; if the theme is outdated (abondoned), you will probably receive no reply.
Either way… you know how to move forward 🙂
Forum: Fixing WordPress
In reply to: Fatal ErrorHi Stephanie,
It sounds like you have a plugin (or theme option) which is trying to use the WP_Error class, but it using it incorrectly.
I would start by deactivating ALL plugins; and see if the error persists.
If you are unable to log into your admin panel to deactivate plugins; then you will need to use either FTP or your hosts cPanel software (via your browser) to gain access to your file directories.
Once there, navigate to the
wp-contentdirectory. You will see a folder namedplugins. Rename this folder TEMPORARILY to something likeplugins_temp.Now, go back and log into your admin panel. You should notice all plugins are gone… but you can now re-access your website.
Now, reactivate a few plugins… and make sure you are able to continue browsing your site with no errors. When you know you’re good… activate a few more plugins; and repeat.
Eventually you should find a plugin that is throwing the error. You will need to contact that plugin author for assistance.
Lastly, if NO plugins were are fault, the issue might be with your theme. Try switching to the default 2016 WordPress theme; and see if the issue persists. If it does not, then it is your theme.
Please let us know how you do.
Forum: Fixing WordPress
In reply to: add_object_page is deprecated since version 4.5.0You’ll need to use either FTP or your hosts cPanel software (via your browser) to gain access to the file directories where you installed WordPress.
The
error_logfile can be found in the root directory (where you originally edited thewp-config.phpfile).You can download and save this error log file (to keep for posterity); or you may simply delete it from the server. As new errors are found; they
error_logfile will be automatically created again. So, if you delete it, and theerror_logappears again… then you know the error is still present.Remember to keep deleting that file as you are troublshooing; it’ll get confusing if you forget to delete, and see the same errors 😉
Forum: Fixing WordPress
In reply to: add_object_page is deprecated since version 4.5.0Hi,
You are probably using an outdated plugin or theme option that is still calling the deprecated
add_object_page()function.I would start by deactivating all plugins; and clearing the error log. Next, reactivate a few plugins, and click a few pages of your website admin panel (just to see if error reproduces).
If the error does NOT show, go back and activate a few more plugins, again repeating the clicking admin pages, and again check the error log.
If you do this for ALL plugins and still show the error; then it may be in your theme. In this case, try switching to the default 2016 theme, clearing the error log, and clicking admin pages. Again, check the log.
Eventually you will find a plugin (or theme option) that is causing the error.
PS:
That error notice is not very helpful as it does not provide the location of the file that is calling the deprecated function. It only tells you the function name; so you have to dig for answers.Let us know how you do.
Forum: Fixing WordPress
In reply to: Embed Woocommerce Product details page info into another pageYou’re very welcome. Yes, those product shortcodes can be very powerful. Super glad it is working properly for you!
Forum: Fixing WordPress
In reply to: IF post is inside a specific category😉 You’re welcome!
Forum: Fixing WordPress
In reply to: Embed Woocommerce Product details page info into another pageCan you not just use a Woo product shortcode on your “classes” page?
Something like:
[product id="99"].. where 99 is the product id.Forum: Fixing WordPress
In reply to: WordPress Menu MetaboxHi,
If you mean creating an additional metabox for the “add/edit post” and/or “add/edit page” screens; then you’ll want to review this Codex page:
https://codex.wordpress.org/Plugin_API/Action_Reference/add_meta_boxesForum: Fixing WordPress
In reply to: Script line appearing on header of websiteHello Mark,
My guess would be it is some rogue code added by a plugin (or your theme) which is not coded properly.
I would start by deactivating ALL my plugins and see if it disappears. If it does, begin re-enabling plugins a few at a time, going back to check if the script returns. Keep doing this until you narrow down which plugin is causing the issue.
I would imagine it is a plugin that has to do with money (shopping cart, donation, etc.) since the code mentions “currency”.
Forum: Fixing WordPress
In reply to: IF post is inside a specific categoryYou may try something like this:
<section class="news-list"> <?php $the_query = new WP_Query( 'posts_per_page=5' ); ?> <?php while ($the_query -> have_posts()) : $the_query -> the_post(); ?> <div class="news-list__item" data-scroll-watch> <a href="<?php the_permalink() ?>"> <div class="news-list__item__image" data-bg-img="<?php the_post_thumbnail_url(); ?>"></div> <?php foreach((get_the_category()) as $category) { // Define default color $bg_color = 'CCC'; // Check if slug matches one of our slugs if ($category->slug == 'thoughts') $bg_color = '#F00'; if ($category->slug == 'social') $bg_color = '#000'; if ($category->slug == 'story') $bg_color = '#EEE'; echo '<div class="news-list__item__text" data-bg-color="' . $bg_color . '">'; echo '<p>' . $category->cat_name . '</p>'; } ?> <p><?php the_title(); ?></p> </div> </a> </div> <?php endwhile; wp_reset_postdata(); ?> </section>Forum: Fixing WordPress
In reply to: 4.6 has crashed my siteIs it a premium theme (did you purchase the theme)? Or is a free theme provided here on the WordPress plugin repository?
Forum: Fixing WordPress
In reply to: 4.6 has crashed my siteIt appears your theme is using a function named
the_post_thumbnail_caption(); which was included in WordPress core in version 4.6.I would suggest contacting your theme author; and explaining the situation. Since this function is now included in WordPress core; they may want to remove the function; or re-write it.
There is also a thread on Stack Overflow explaining the function inclusion into WordPress core (and how to modify). See THIS topic; 2nd response.
Forum: Fixing WordPress
In reply to: Custom category templateGreat!! 🙂
Sorry, I had to leave yesterday. Super glad you got it working properly! Nice.
Forum: Fixing WordPress
In reply to: Custom category templatePerhaps something like this?
$cat_id = get_category( get_query_var( 'cat' ) ); $categories = get_categories( array( 'parent' => $cat_id ) );This should give you an array of all child categories of the parent. Then, all you need to do is loop them, and extract what info you need.
foreach( $categories as $cat ) { echo '<li>'.$cat->name.'</li>'; }That should give you a list of all child categories names. You can use ‘var_dump( $cat )’ inside the loop to see what other values you can retrieve. I know you can also use `$cat->description’ to get the category description.