NWTD
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: WordPress dashboard, viewing CPT results in 504Thanks again luistinygod!
Forum: Fixing WordPress
In reply to: WordPress dashboard, viewing CPT results in 504I was able to resolve this by adding this function:
add_action( 'pre_get_posts', 'nwtd_lpfs_custom_admin_query' ); function nwtd_lpfs_custom_admin_query( $query ) { if( !is_admin() && !$query->is_main_query() ) { return; } if( is_post_type_archive( 'services' ) ) { $query->set('no_found_rows', 1 ); $query->set('update_post_meta_cache', 0 ); $query->set('update_post_term_cache', 0 ); } }Forum: Fixing WordPress
In reply to: WordPress dashboard, viewing CPT results in 504Any suggestions from anyone else? — Maybe this is posted in the wrong forum. Should this be posted under “-Hacks”? If so, can a mod move it?
Forum: Fixing WordPress
In reply to: WordPress dashboard, viewing CPT results in 504Thanks phillibooth. I do have everything you suggested without the 3-4GB of memory.
I’m trying to find some other solution rather than throwing a bunch of memory at the problem.
I anticipate having a few other sites that will be of similar nature with the amount of posts and taxonomy terms….especially if any of these sites need to be edited simultaneously. I don’t want to run into a problem where I need 50GB of memory to run a dozen websites….there’s got to be a better solution.
TIA
Forum: Fixing WordPress
In reply to: WordPress dashboard, viewing CPT results in 504Thanks for the helpful suggetions phillbooth.
I’ve had most of these already in place, with the exception of using 2Gb of memory…it was previously set to 1Gb.
After increasing to 2Gb I was able to view the posts, however, I see a slew of errors:
WordPress database error: [MySQL client ran out of memory] SELECT t.*, tt.*, tr.object_id FROM wp_terms AS t INNER JOIN wp_term_taxonomy AS tt ON tt.term_id = t.term_id INNER JOIN wp_term_relationships AS tr ON tr.term_taxonomy_id = tt.term_taxonomy_id WHERE tt.taxonomy IN ('locations') AND tr.object_id INWordPress database error: [Lost connection to MySQL server during query] SELECT post_id, meta_key, meta_value FROM wp_postmeta WHERE post_id INWordPress database error: [MySQL server has gone away] SELECT DISTINCT YEAR( post_date ) AS year, MONTH( post_date ) AS month FROM wp_posts WHERE post_type = 'services' ORDER BY post_date DESCIs there a way to alter this query so it’s not so heavy? It makes it difficult to manage these posts if I have to get to them from the front-end.
FWIW, I did repair and optimize the tables, but according to that, everything was fine and already optimized.
Forum: Fixing WordPress
In reply to: Passing queried taxonomyThe problem with that solution is that each post is assigned to multiple taxonomy terms. So using
<?php echo single_tag_title(); ?>just returns all taxonomy terms of that post.I’l like to just reference the one taxonomy term that was clicked on from the get go.
To get a better idea, take a look at my example: http://chip-smith.com/dev2/areas-we-service/
If you were to click on “Abbott, CA” (which is a taxonomy term), you are then taken to my page template
taxonomy-locations.phpand are shown all posts in that taxonomy term “Abbott, CA”. Clicking any post takes you to thesingle-services.php. In that ‘single-services.php`, I’d like to reference the queried taxonomy term…so in this case I want to display “Abbott, CA”.Hope that helps make more sense.
Forum: Plugins
In reply to: [Posts 2 Posts] Connection Titles embedded into post titlesDo you have an example of this working? I think I need to accomplish the same thing, but I’m not exactly sure. Thanks!
Forum: Plugins
In reply to: [Posts 2 Posts] Retaining connected post infoI can’t seem to find much on the topic. Is the post 2 post relationship using a query? How might I reference that queried object. With something like
get_queried_object()?Pardon my ignorance, I’m not great with PHP and am learning on the fly. I’d be happy to donate or pay for your assistance in helping me figure this out.
Forum: Plugins
In reply to: [Posts 2 Posts] Retaining connected post infoI missed that in the documentation, my apologies. At quick glance and implementation, it seems that the shortcode just dumps out all connected locations of my service post. Is there a way to filter that output to only show the one location that was queried? Hopefully that’s not too confusing.
Thanks for that fast response!
Forum: Fixing WordPress
In reply to: Custom permalinks for custom post type and taxonomyOn Problem 2, if the appendage of “-2” is unavoidable, could it be changed to be “-%taxonomyterm%”? So in that example, the output would be
http://domain.com/victorville-ca/plumbing-victorville-caForum: Fixing WordPress
In reply to: Custom permalinks for custom post type and taxonomyHere’s my .htaccess:
# BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase /dev2/ RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /dev2/index.php [L] </IfModule> # END WordPressForum: Plugins
In reply to: [Testimonials Widget] Testimonial archiveThanks for the quick response and your time. I’ll give this a whirl and see where it takes me. I’m actually developing in the Genesis Framework, so I’ll have to tweak their loop a bit to get this to function.
Thanks again.
Forum: Plugins
In reply to: [Testimonials Widget] Testimonial archiveI apologize. I did not realize it had only been 24 hours.
Your time and support are greatly appreciated.
Please accept $20 worth of Karma.
Forum: Plugins
In reply to: [Testimonials Widget] Testimonial archivebump
Forum: Themes and Templates
In reply to: get_post_meta not workingThis ended up being an issue with the framework I’m using, Genesis. I had to us the
genesis_get_custom_field('myfield')call for it to work.