winnewoerp
Forum Replies Created
-
Thanks, Darian! I switched to your Help Desk recently, so yes, it can be marked as resolved here (although technically it is not).
I solved it like this using jQuery:
$('.wpcf7 input[type="checkbox"], .wpcf7 input[type="radio"], select').on('change',function(){ setTimeout(function(){ $('.wpcf7 input[type="checkbox"], .wpcf7 input[type="radio"]').each(function(){ if($(this).is(':hidden') && $(this).is(':checked')) $(this).prop('checked', false); }); $('.wpcf7 option').each(function(){ if($(this).closest('select').is(':hidden') && $(this).is(':selected')) $(this).prop('selected', false); }); },1000); });
- This reply was modified 3 years ago by winnewoerp.
Forum: Developing with WordPress
In reply to: Perform extra actions on post saveThank you, @diondesigns and @kayart. This was very helpful for me.
Forum: Plugins
In reply to: [Imsanity] JPG quality reduction if not resizing after uploadThanks for your reply! I decided now that even without compressing/optimizing images, Imsanity is sufficient for our case.
Forum: Developing with WordPress
In reply to: Strange error with get_next_post() and get_previous_post()I’m sorry, I need one more clarfificaton before I can continue.
If you keep track of what “page” is being displayed, you can sync up next/previous links with what’s displayed on overview.
How would I achieve this? How can I know in the single post view what “page” is being displayed from the overview list? In the overview list I don’t have the “1 post per page” setting and I have no idea of how to keep track of the position in the list except when passing an extra query arg to the single view, which certainly is not the best way to do this.
Forum: Developing with WordPress
In reply to: Strange error with get_next_post() and get_previous_post()@bcworkz, this is a really helpful answer, thank you very much! I will work on my solution now and post it here when it’s ready.
Forum: Plugins
In reply to: [Polylang] wp_get_nav_menu_items() causes infinite loop with PolylangHi there,
I was hoping to get a hint here, so I’m trying again: Has anyone got an idea how to resolve this?
Kind regards
joschi81Thanks for your reply. Sorry, I already found another solution for our carousel in the meantime, so I don’t have a link available anymore.
Forum: Fixing WordPress
In reply to: Media Upload not working (http error)I have the same problem with WP 4.6.
@sunseekin, thanks for you hints, but it didn’t work out for me, as there were no changes after setting PHP to v5.6 and the values of the two fields you mentioned were already empty.
Anyone has any other suggestions?
Forum: Plugins
In reply to: [Polylang] Copy custom meta when creating translationsYes, sorry… ?? Like this:
Thanks ?eslav for your help and thanks Chouby for the great plugin!Forum: Plugins
In reply to: [Polylang] Copy custom meta when creating translationsResolved, I found the solution for copying title and content to new translations here:
https://www.junaidbhura.com/make-polylang-wordpress-plugin-copy-the-content-from-the-original-post/Thus, thanks junaid – and thanks again ?eslav for the great plugin.
Forum: Plugins
In reply to: [Polylang] Copy custom meta when creating translationsThat works, thank you very much. Now, the only question is how to copy title and content initially to new translations. Is tehre a way to achieve that?
Forum: Plugins
In reply to: [Polylang] Copy custom meta when creating translationsPS: And is it also possible to copy post title and content when a translation is created – without synchronization during the following changes?
Forum: Plugins
In reply to: [Polylang] Copy custom meta when creating translationsHi ?eslav,
thanks for your reply. I did it like this:
// copy selected post metas for polylang plugin add_filter('pll_copy_post_metas', 'copy_post_metas'); function copy_post_metas($metas) { return array_merge($metas, array('konzertdaten_konzertdatum','konzertdaten_konzertdatum_archiv')); }
However, it’s being copied _and_ synchronized. I don’t see how to disable synchronization. Where do I have to put the respective argument?
Kind regards
joschi81Forum: Plugins
In reply to: 'posts_where' filer: complex condition including custom fields possible?Ok, mission 1 accomplished, here’s how you can extend the posts_where filter to search for a string within title, content and display name of user:
// additional filter to query "title like %...% or content like %...%" or post_author (display_name) like %...% add_filter( 'posts_where', 'theme_title_content_like_posts_where', 10, 2 ); function theme_title_content_like_posts_where( $where, &$wp_query ) { global $wpdb; if ( $post_title_content_like = $wp_query->get( 'post_title_content_like' ) ) { $where .= ' AND (' . $wpdb->posts . '.post_title LIKE \'%' . esc_sql( $wpdb->esc_like( $post_title_content_like ) ) . '%\''; $where .= ' OR '. $wpdb->posts . '.post_content LIKE \'%' . esc_sql( $wpdb->esc_like( $post_title_content_like ) ) . '%\''; $where .= ' OR '. $wpdb->posts . '.post_author IN (SELECT ID FROM '.$wpdb->users.' WHERE display_name LIKE \'%' . esc_sql( $wpdb->esc_like( $post_title_content_like ) ) . '%\' ))'; } return $where; }
Now, going over to mission 2: Including my custom author-name field.
Any hints?
Best regards
joschi81