tnoguchi
Forum Replies Created
-
Forum: Plugins
In reply to: [Social Media Feather | social media sharing] PHP Deprecation NoticesJust to clarify, this is with the latest version of the plugin 2.1.4
Forum: Plugins
In reply to: [Simple Cloudflare Turnstile - CAPTCHA Alternative] wpDiscuz plugin problemHi, it seems that we also have this problem even though we updated to the latest version 1.18.3 on our sandbox using wpDiscuz. Production seems to be working correctly and is running an older version 1.17.2
Forum: Plugins
In reply to: [BackWPup – WordPress Backup & Restore Plugin] Litespeed server support?I also saw the article for updraft plus and amended my .htaccess file before, but I just realized that I needed to add the rule to a subdirectory where my WP install is since it’s not in the root folder.
After I added the ReWriteRule and set the max execution time to 30 seconds, my backups seem to be working now.
Thanks everyone for your inputs.
Forum: Plugins
In reply to: [BackWPup – WordPress Backup & Restore Plugin] Litespeed server support?Hi Daniel,
I’ve already tried to set the maximum execution time from anywhere between 30 to 1200 seconds but still haven’t been able to get the plugin to work. Do you have any other suggestions?
Thanks,
Tak
Forum: Hacks
In reply to: Paginated Custom Post Type Archive: 404 ErrorHi bcworkz, thank you for your thoughtful insights. I think of all WP things, permalinks and pagination have to be the two things that I find maddeningly complex.
I think that my approach was probably the issue, like you said. Overriding the default query for archives is far too complex.
As a solution, I ended up creating a custom page template from the above custom query and assigned it to a page that I created.
Forum: Hacks
In reply to: Display Groups of Custom Posts by their Custom Taxonomy TermWell after taking a break and consulting the oracle, I was able to find a helpful post on stackoverflow with a solution by Diogenes.
The solution actually makes a lot of sense; two nested foreach loops, one to retrieve the category terms and the other to retrieve the individual posts under each category:
<!-- Begin custom tax loop --> <?php //Retrieve custom taxonomy terms using get_terms and the custom post type. $categories = get_terms('tn_cstm_work_taxonomy'); //Iterate through each term foreach ( $categories as $category ) : ?> <div class="row"> //Use $category->slug to retrieve the slug <section id="<?php echo $category->slug; ?>" class="large-12 columns" data-magellan-destination='<?php echo $category->slug; ?>'> <h3><?php echo $category->name; ?></h3> <ul class="large-block-grid-4 small-block-grid-2"> <?php //Setup the query to retrieve the posts that exist under each term $posts = get_posts(array( 'post_type' => 'tn_cstm_portfolio', 'orderby' => 'menu_order', 'order' => 'ASC', 'taxonomy' => $category->taxonomy, 'term' => $category->slug, 'nopaging' => true, )); // Here's the second, nested foreach loop that cycles through the posts associated with this category foreach($posts as $post) : setup_postdata($post); ////set up post data for use in the loop (enables the_title(), etc without specifying a post ID--as referenced in the stackoverflow link above) ?> <li> <?php //retrieves the post thumbnail for each post $thumb = get_post_thumbnail_id(); $img_url = wp_get_attachment_url( $thumb,'medium' ); //get full URL to image (use "large" or "medium" if the images too big) $image = aq_resize( $img_url, 300, 270, true ); //resize & crop the image using aqua resizer https://github.com/sy4mil/Aqua-Resizer ?> <figure class="work-thumb"> <a class="th" href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"> <?php if($image) : ?> <img src="<?php echo $image ?>" alt="<?php the_title(); ?> thumb"/> <?php else : ?> <img class="" src="<?php bloginfo('stylesheet_directory'); ?>/img/small-placeholder.png" alt="placeholder image"> <?php endif; ?> </a> <figcaption><h4><a href="<? the_permalink()?>" rel="bookmark" title="<?php the_title(); ?>"><?php the_title(); ?></a></h4></figcaption> </figure> <?php } ?> </li> <?php endforeach; ?> </ul> </section> </div><!-- .row --> <?php endforeach; ?>//Easy Peasy
Forum: Plugins
In reply to: [Simple Page Ordering] How to make plugin work with custom post typeYou’re welcome. The FAQ on the plugin page isn’t very clear, but it seems that in addition to adding the argument to
page-attributes
in theregister_post_type
function, it seems necessary to also add'order' => 'ASC'
in the template custom query in addition to the ‘orderby'
argument.Forum: Plugins
In reply to: [Simple Page Ordering] How to make plugin work with custom post typeThe plugin won’t add in changes to your template markup. Did you add the modified query code in your template?
'orderby' => 'menu_order', 'order' => 'ASC',
It won’t work without it.
Forum: Plugins
In reply to: [Simple Page Ordering] How to make plugin work with custom post typeYou can refer to the codex page that I linked above. As I mentioned, the ‘elaborate’ example shows you where the argument goes.
Forum: Plugins
In reply to: [Simple Page Ordering] How to make plugin work with custom post typeI can’t really answer this question without looking at the theme code. If you’re using a premium paid theme, I suggest that you ask the theme developers directly. They’ll probably have a support forum for this.
If not, I would use a code editor to search the theme template files for the specific custom post type slug and or the term ‘register_post_type’.
Forum: Plugins
In reply to: [Simple Page Ordering] How to make plugin work with custom post typeYou’ll need to add them when you register your custom post type using the register_post_type function.
See the “Elaborate” example in the codex page that I linked above. If you’re using a plugin to create your custom post type, try to see if you can add an argument:
'supports' => array('title, thumbnail', 'page-attributes' )
Also remember to add the ‘orderby’ => ‘menu_order’ and ‘order’ => ‘ASC’, to the following in your custom query:
$args = array( 'numberposts' => -1, 'orderby' => 'menu_order', 'order' => 'ASC', 'post_type' => 'staff' ); $staff = get_posts($args);
Forum: Plugins
In reply to: [Newsletter Sign-Up] Any way to add a class to the p tags in the form?I didn’t figure out a way to add classes to the p tags, but if you’re just trying to add them to be able to target them with css selectors, I suggest using ‘child’ pseudo classes: https://css-tricks.com/how-nth-child-works/
For example in my scss code I’m targeting the name, email and submit inputs in the following way:
// child pseudo classes give explicit style and positions to nsu form inputs and submit buttons .nsu-form { p { &:first-child { // p tag wrapping name input position: relative; width: 50%; float: left; } &:nth-child(2){ // p tag wrapping email input position: relative; width: 50%; float: right; } &:last-child { // p tag wrapping submit input position: relative; width: 50%; float: right; } }
Hope that this helps. If you don’t know scss conventions, basically the above is the same as p:first-child { } .. p:nth-child(2) {} .. etc
Forum: Plugins
In reply to: [Yoast SEO] [Plugin: WordPress SEO by Yoast] Deprecated: Function split()I encountered the same error, basically the PHP function “split” has been deprecated in PHP vers. 5.3.
To fix this error you’ll have to edit the above file “wpseo-functions.php”
Find line 306 and replace split with explode:
//$clean_slug_array = array_diff ( split( " ", $clean_slug ), wpseo_stopwords() ); $clean_slug_array = array_diff ( explode( " ", $clean_slug ), wpseo_stopwords() );
Forum: Hacks
In reply to: get_post_meta stomping on custom loop results…Okay, this was totally a CSS issue and not, what I had earlier thought, a problem with my PHP.
Forum: Hacks
In reply to: get_post_meta stomping on custom loop results…A follow-up. I looked at the underlying html being produced. There’s actually nothing wrong with it technically. Each of the thumbnails, excerpts and post-meta is being produced. For some reason this seems to be a bug in Chrome?
FF seems to be rendering the page more or less correctly. However, even though the code is correct, Chrome is repeating the first li panel content over and over.