jt70
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Spacing is driving me nutsThanks for the suggestion.
That has some promise. I’ll look into it.Forum: Fixing WordPress
In reply to: Spacing is driving me nutsThanks anasmouaziz.
That was what I do know how to do. It works great when I want space between blocks.
My issue is when I have something within a classic paragraph, and maybe have a H2 or H3 header within it or an image and want to put some space inside of the classic paragraph block. I keep a master document (encyclopedia) on Word that I distribute as a PDF-several hundred pages. I post parts of the individual terms on my site, so I like being able to copy and paste big chunks into one block–makes it so much easier to make sure I get all the edits I made in several pages with dozens of paragraphs from the document onto the website.
But, I can’t get the non-breaking space to work consistently. Sometimes it shows up on the page and sometimes it won’t.
The only thing I can do consistently is if I use shift+enter where I want the space, it shows up, but I have to put them all in at once every time I make an edit. It seems like whatever that formatting does reverts to just a normal return with each edit.- This reply was modified 2 years, 10 months ago by jt70.
Forum: Plugins
In reply to: [Download Manager] Can I set a custom download number?Nevermind…as it turns out, the URL is masked by my email marketing provider via their linking system. It is an irrelevant question for me.
Thanks anyway!Forum: Themes and Templates
In reply to: [Hestia] Are related posts just recent posts?Thanks Taran. That’s what I thought.
Forum: Themes and Templates
In reply to: [Hestia] GTMetrix Speed issuesmy scores were good with the hestia free theme–way better than my decade old theme. Just in a competitive space and am trying for every advantage. pagespeed went from 89 to 92. yslow went from 81 to 89 after optimize plugin.
thanksForum: Themes and Templates
In reply to: [Hestia] GTMetrix Speed issuesThanks for the suggestion. Works good. It didn’t change the actual load time, but it goosed page speed by 3 points or so, and jumped yslow by 7. Lots fewer requests too. every little bit helps…
I’m going to mark this as resolved even though it wasn’t within the theme. Great theme.Hi gab81.
Any progress on this? There have been a handful of people posting about this over the years, but it seems that it is not widespread of a problem enough to get serious attention.
My guess is that there is a plugin conflict going on where the ‘Clear all cache files when a post or page is published or updated.” is automatically enabled regardless of how it is set. My completely non-programmer guess is that there is an issue with the same variable being used in multiple plugins, but as a disclaimer, I know very little about programming and am not sure that this could even happen.
I tried messing with this a bit by disabling plugins, but couldn’t get too deep into it for fear of breaking something.There are a few workaround fixes if you search through the older support forums, but they all have some shortcomings. Depends on what you need.
Good luck, and please post if you hear anything.
Forum: Plugins
In reply to: [WP Super Cache] Updating one post need whole cache rebuild again?by the way, the code lines mentioned in the previous thread have since changed. I also recall I had to comment out something slightly different than what the comment with the code says.
Of course, make sure to save the original files before you modify anything so you can get back up if you break something.Forum: Plugins
In reply to: [WP Super Cache] Updating one post need whole cache rebuild again?I have the same problem. I found a thread a few years back with a workaround, and have used it with some recent updates, but I haven’t tried it with the most recent update (to WP and this plugin). The problem with this method is that that you have to modify the plugin code manually each time there is an update.
It fixes the issue with posts, but not pages, by the way. Updating pages will still clear the cache.
Good luck.
https://www.ads-software.com/support/topic/cache-deleted-after-every-post-editIt would be nice to get a permanent solution, though.
Forum: Plugins
In reply to: [WP Super Cache] Cache deleted after every post editUmm….nevermind….
Operator error. I was commenting out the wrong line.
Thanks anyway.
Forum: Plugins
In reply to: [Contact Form 7] Speeding up site-why load css/js on all pages?Thanks Takayuki,
I found another method that doesn’t entail changing any plugin files, and modified the code a bit. I just insert this once into my theme functions.php. I’m not really a coder but can normally make a few tweaks to get something basic to work. What do you think?
I like it because I can combine it with multiple plugins and should work with plugin updates.
JT70// DEREGISTER PLUGIN EVENTS function dvk_dequeue_scripts() { $load_scripts = false; if( is_singular() ) { $post = get_post(); if( has_shortcode($post->post_content, 'contact-form-7') ) { $load_scripts = true; } } if( ! $load_scripts ) { wp_dequeue_script( 'contact-form-7' ); wp_dequeue_style( 'contact-form-7' ); } $load_poll_scripts = false; if( is_singular() ) { $post = get_post(); if( has_shortcode($post->post_content, 'poll') || has_shortcode( get_post_meta( get_the_ID(), 'YOUR_FIELD_ID', true ), 'poll' ) ) { $load_poll_scripts = true; } } if( ! $load_poll_scripts ) { wp_dequeue_script( 'wp-polls' ); wp_dequeue_style( 'wp-polls' ); } } add_action( 'wp_enqueue_scripts', 'dvk_dequeue_scripts', 99 );
Forum: Plugins
In reply to: [WP-Polls] Loading CSS/JS on all pages vs. ones with pollsLester,
I found what I was looking for….if( has_shortcode($post->post_content, 'poll') || has_shortcode( get_post_meta( get_the_ID(), 'YOUR_FIELD_ID', true ), 'poll' ) ) {
You have to know the name of the custom field, but it seems to be working for me now.
Thanks again.
JT70Forum: Plugins
In reply to: [WP-Polls] Loading CSS/JS on all pages vs. ones with pollsLester,
Do you know if there is some way to check custom fields with something similar to has_shortcode($post->post_contentI was looking to see of there was a has_shortcode($post->post_custom-values or something like that. I would add an || to the if. Can’t find what I am looking for, though.
Again, thanks for the help here.
Regards,
JT70Forum: Plugins
In reply to: [WP-Polls] Loading CSS/JS on all pages vs. ones with pollsI changed from tags to ‘has_shortcode’
I was actually just working on that as your update came in. I am using this following code now for WP-Polls and Contact form 7. (Found and modified the code, BTW.)
I just figured out it would do what you mentioned as I have some polls in custom fields. Fortunately, with my theme on those polls, I can put the shortcode in the editor which doesn’t actually display. I have a CMS style theme that pulls everything from custom fields. I don’t have any polls in sidebars, so I am OK there. I think this will work for me, but it probably would not work for everyone. Now I just have to go do a search for my custom field shortcodes in phpMyAdmin and I should be set.
Thanks for the feedback.// DEREGISTER PLUGIN EVENTS function dvk_dequeue_scripts() { $load_scripts = false; if( is_singular() ) { $post = get_post(); if( has_shortcode($post->post_content, 'contact-form-7') ) { $load_scripts = true; } } if( ! $load_scripts ) { wp_dequeue_script( 'contact-form-7' ); wp_dequeue_style( 'contact-form-7' ); } $load_poll_scripts = false; if( is_singular() ) { $post = get_post(); if( has_shortcode($post->post_content, 'poll') ) { $load_poll_scripts = true; } } if( ! $load_poll_scripts ) { wp_dequeue_script( 'wp-polls' ); wp_dequeue_style( 'wp-polls' ); } } add_action( 'wp_enqueue_scripts', 'dvk_dequeue_scripts', 99 );
Forum: Plugins
In reply to: [WP-Polls] Loading CSS/JS on all pages vs. ones with pollsI was doing some looking around, and it seems I might be able to do something like this in my functions.php
Obviously, this was taken from someone doing this for a different plugin, but the premise is that you have to specify the script to run with a tag. I added the tag part–the original looked for a specific page. I’m pretty miserable at coding, but this example seems backwards to me. I’d think it should do nothing if it has the tag, and deregister if there was no tag. It could just be I am reading the code wrong, though.
Any thoughts you’d be willing to share?// DEREGISTER JAVASCRIPT EVENTS function decalendarjs() { if ( has_tag( 'poll' ) ) { wp_deregister_script('tribe-events-pjax'); wp_deregister_script('tribe-events-calendar-script'); } } add_action( 'wp_print_scripts', 'decalendarjs'); // now just run the function