SpankMarvin
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Location of Custom Post Types on webpageIf I understand the question correctly, you’d want to use a COUNTY taxonomy. You could then cycle through the terms of that taxonomy, and for each term, perform a query of posts belonging to that term. It’s definitely doable.
Forum: Fixing WordPress
In reply to: Cannot access WP Admin due to code changeYou’re going to need to FTP your way to that file to make the change. Or, log into whatever your host has as a file manager and do it from there. That’s really the only way once you get an error that is fatal…
That’s not how the function is working. It’s saying “if there is any output, do the output,” not “If the category is not empty, show the category.”
So is your list not appearing AT ALL, or is it only showing populated terms?
Anywhere in that array? So:
<?php $terms = wp_list_categories( array( 'taxonomy' => get_queried_object()->taxonomy, 'child_of' => get_queried_object_id(), 'depth' => 1, 'hide_empty' => 0, 'title_li' => false, 'show_option_none' => false, 'echo' => false ) ); ?>What’s the other thing you’re trying to change?
Add ‘hide_empty’ => 0 to that array?
What’s the code generating the menu?
Forum: Fixing WordPress
In reply to: Header logo won't center only showing content when on mobile?Oh – just noticed the div is one of a three-column layout, so you really shouldn’t change the number. I’d go with the responsive image solution.
Forum: Fixing WordPress
In reply to: Inserting PHP inside do_shortcodeYou should do this via hooks if you can. Take a look at the shortcode function for the existing accordian shortcode and see if it’s pluggable. If so, simply add_action or add_filter into that with your custom function and arrays. If not, copy the shortcode function, remove the shortcode and then re-add it with the copied-and-renamed function for the overriding shortcode, which would add your arrays.
At least, I think that’s how you’d want to do it.
Make sense?
J
Forum: Fixing WordPress
In reply to: Header logo won't center only showing content when on mobile?So, your issue is with how the logo image itself is playing with Bootstrap’s container div. It’s sitting inside of a col-sm-4 div, meaning that anything larger than I think 768px will restrict the container to 1/3 of the containing row size, pushing a full-sized image off-center.
You have two options: make the logo container full-width (col-sm-12) and add the text-center class to that same div (might work, can’t test it), or make the image itself responsive relative to its container, either by adding the class “img-responsive” to the image tag itself, or by adding max-width: 100%; to the style for the image. The caveat with making the image size responsive is that the image will reduce in size as you narrow down the browser width.
Cheers!
J
Forum: Fixing WordPress
In reply to: Specific Slug Freezing Page Load?I should add: the page freezes before rendering. I.e. I get the browser waiting for a response but never even as far as a white screen, so I cannot use wp-config to troubleshoot any scripting errors.
Forum: Plugins
In reply to: [Intuitive Custom Post Order] Over-ride CPO in shortcode WP_queryHey Will
Not sure if you’re having this problem still, but I have a solution for you to try. Mine comes from the need to orderby => meta_value only under the condition that it was defined in the shortcode. In the context of my site, this meant that if a shortcode called a surname parameter in it’s listing of people, the order should be by surname instead of drag n drop. However, this was being overridden by the plugin no matter what my arguments for the query.
So, I disabled the filter called by the plugin class, only if the parameter was called. Here’s the removal code:
global $hicpo; // Call the class variable for the ICO plugin, so we can disable its overriding of the orderby parameter remove_filter( 'pre_get_posts', array( $hicpo, 'hicpo_pre_get_posts' ) );Hope this helps,
John
Forum: Fixing WordPress
In reply to: White Screen of DeathYou can also modify your wp-config.php file to show debug info:
define( ‘WP_DEBUG’, true );
Forum: Fixing WordPress
In reply to: Display Featured Image with latest post grabYou’ll want to replace the img tag with
<?php the_post_thumbnail(); ?>
Forum: Fixing WordPress
In reply to: WordPress site wont work correctly in ie8You can find it at https://github.com/scottjehl/Respond
Add it to your theme folder. From there you should hook into the wp_head hook to conditionally include the script (the following assumes you have placed respond.js in your_theme_folder/js/
function add_respond_ie() { global $is_IE; if ($is_IE) { echo ('<!--[if lt IE 9]> <script type="text/javascript" src="'.get_template_directory_uri().'/js/respond.js"></script> <![endif]-->'); } } add_action('wp_head', 'add_respond_ie');Have a go with that and see whether it makes a difference.
Forum: Fixing WordPress
In reply to: WordPress site wont work correctly in ie8A quick fix worth trying is to add respond.js as a conditional (lt IE9) to your theme. This fixes a lot of media query issues with IE8 and is certainly worth a try.