DenisCGN
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Gravatar GDPR DSGVOThanks for moving to the right place.
I know how to deactivate GRAVATARS. But then no custom profile image is shown.
That’s my problem ??
Denis
Forum: Fixing WordPress
In reply to: User Image without GravatarHello,
thanks, but I Don’t want to install another plugin.
Cheers,
DenisForum: Plugins
In reply to: [GEO my WP] reload results on map zooming + map with no resultsHello Eyal,
thanks both functions work fine.
How can I set the users choosen Radius instead of the zoom level?
The problem is:
if you search for “Siegen” radius 50 there are no results but the city K?LN/Cologne is shown. But without results.
If you search for “Siegen” radius 100 the map has results.
Maybe showing just the radius or easier only the starting map with all results will be more user friendly.
Denis
Forum: Plugins
In reply to: [GEO my WP] Geo My WP integration with WPUFI use this:
function update_GEOmyWP( $post_id, $form_id ) { // check the right FORM if ( $form_id != 154 ) { // your form ID return; } // make sure post ID exists. if ( ! $post_id ) { return; } // verify the updater function. if ( ! function_exists( 'gmw_update_post_location' ) ) { return; } if ( isset( $_POST['rockspot_place'] ) ) { // Your fieldkey list( $rs_address, $rs_lat, $rs_lng ) = explode( '||', $_POST['rockspot_place'] ); list( $rs_street, $rs_place, $rs_country ) = explode( ',', $rs_address ); list( $rs_postcode, $rs_city ) = explode( ' ', trim( $rs_place ), 2 ); $location = array( 'lat' => (float)$rs_lat, 'lng' => (float)$rs_lng ); //run the udpate location function gmw_update_post_location( $post_id, $location ); } } add_action( 'wpuf_add_post_after_insert', 'update_GEOmyWP', 10, 2 ); add_action( 'wpuf_edit_post_after_update', 'update_GEOmyWP', 10, 2 );
Forum: Plugins
In reply to: [Cachify] New Post Cache after votingHab es gefunden!
if ( has_action('cachify_remove_post_cache') ) { do_action('cachify_remove_post_cache', 123); // postID }
Forum: Plugins
In reply to: [GEO my WP] Map not workingAll is working Fine, I just insatalled WP new. Great plugin!
Forum: Developing with WordPress
In reply to: Show all Terms with wp_get_object_termsPerfect, this is my solution, for 10 Terms its fine ??
function check_rock_details_1() { global $post; $rock_details_1 = wp_get_object_terms( $post->ID, 'rock_details', ['fields'=>'ids'] ); if ( ! empty( $rock_details_1 ) ) { if ( ! is_wp_error( $rock_details_1 ) ) { echo '<table border="1"><tr><td colspan="2">Details</td></tr>'; echo '<tr ' . ( in_array( '457', $rock_details_1 ) ? 'bgcolor="green"' : 'bgcolor="red"' ) . '><td>Biergarten / Terrasse (457):</td><td>' . ( in_array( '457', $rock_details_1 ) ? 'JA' : 'NEIN' ) . '</td></tr>'; echo '<tr ' . ( in_array( '455', $rock_details_1 ) ? 'bgcolor="green"' : 'bgcolor="red"' ) . '><td>Billard (455):</td><td>' . ( in_array( '455', $rock_details_1 ) ? 'JA' : 'NEIN' ) . '</td></tr>'; echo '<tr ' . ( in_array( '456', $rock_details_1 ) ? 'bgcolor="green"' : 'bgcolor="red"' ) . '><td>Dart / (e)Dart (456):</td><td>' . ( in_array( '456', $rock_details_1 ) ? 'JA' : 'NEIN' ) . '</td></tr>'; echo '</table>'; } } } add_shortcode( 'rock_details_1', 'check_rock_details_1' );
Is
global $post;
nessesary? When I delete it it does not work.For me it is working fine, maybe if there are some parts to do easier, please let me know…I am happy for any suggestion.
Thanks so much,
DenisForum: Developing with WordPress
In reply to: Show all Terms with wp_get_object_termsThanks a lot, now I saw that I can use ARGS in 3rd
wp_get_object_terms()
If I can use the ARGS that only returns an ARRAY if the taxonomy IDs.So ich I have the ARRY of the taxonomies that are used in the post.
I could easy use IN_ARRAY() and change if YES the color to green.
This seems to be easier, IF I know how to use the 3rd argument ARGS.
Cheers,
DenisForum: Plugins
In reply to: [GEO my WP] Update when post updated WPUFThe Address Field of Wedevs changes.
You need to split it before using the hook.The field is now, address, lat, lng
Cheers,
DenisForum: Plugins
In reply to: [GEO my WP] Posts Locator Function – Not workingUPDATE:
well, I installed the BETA3 version, where I could find that browser and server key fields. And the google API check. The check was GOOD ??
So now, I tried to use the ARRAY of lat and lng.
But how is this ARRAY created?
like this:
$location = array( $lat, $lng );
the function does not work.When I use
$location = $adresse;
(address string) it works.How can I make it work with the lat lng?
And, how das it work with
$location_name
? I thought it will take the Post Title. If I try to use$location_name = 'Hello';
nothing works again ??Thanks,
DenisForum: Developing with WordPress
In reply to: Expand Search Query StringHello Jacob,
so I need to do it with JAVA Script or someting? Cause the user should finally only enter his Postcode and/or his address. Then before sending the search form the postcode must be transformed into lat/lng ??
This seems to be a bit tricky.
therefor I think it seems to be esier to hook into the query and then do int via the functions.php.I must say that is a real cross to do a radius/geo seaarch with wordpress (without using a not fitting theme :-))
Cheers,
DenisForum: Developing with WordPress
In reply to: Expand Search Query StringHello Jacob,
thanks for your answer. To test my query I will use the hidden fields.
But in futur I like the LAT & LNG to be dynamic, cause of what the visitor is came from.
So I need some HOOK or anything else, to modify the query URL with the visitors GEO data (lat & lng).
Cheers,
DenisForum: Developing with WordPress
In reply to: Redirect author linkHi @bcworkz,
I searched Google and found some code that I customized like I need it. And, I deleted my Global $Post ?? And it works without.
function guest_author_name( $authorLinkName ) { $localhero_profile_id = get_the_author_meta( 'localhero_profile_id' ); $localhero_profile_title = get_the_title( $localhero_profile_id ); if ( $localhero_profile_title ) $authorLinkName = $localhero_profile_title; return $authorLinkName; } add_filter( 'the_author', 'guest_author_name' ); add_filter( 'get_the_author_display_name', 'guest_author_name' );
Why I need to use 2 filters, I dont knwo, it works.
Thanks and Cheers,
Denis- This reply was modified 7 years, 5 months ago by DenisCGN.
Forum: Developing with WordPress
In reply to: Post_Name and wp_update_postHi bcworkz,
I use this code above…and it seems to work very well. If titles are double it adds a -2. and if I use for example German charachters the will be change to oe,ae & ue even if I use something like ‘#<> the titel will be changed the way I enter it the first time in a new post.
So I think, the sanitizing is done in the wp_update_post function.
Cheers,
DenisForum: Developing with WordPress
In reply to: Redirect author linkHello bcworkz,
thanks for your answer. Where can I check if the function already uses the $post global?
And, is there a way to change the link name of
author_link
? Preferably I like to change it to the title of the re-directed custom post type.Cheers,
Denis