Forum Replies Created
-
Author
-
HDcmsParticipant
Hi Laura
It works, I just add “button” to be more selectiveCOPY CODE.field-visibility-settings-toggle button { display: none !important; } .field-visibility-settings-notoggle button { display: none !important; }
Thank you and good day
January 10, 2018 at 13:28 in reply to: display only the list of members who match with a search criterion #185375HDcmsParticipantHello,
I put my search field “radio button”: “I’m looking for”
I am waiting for the display of the:
list of all the members who checked “H” if the member put “I search” = “H”
list of all members who checked “F” if the member put “I search” = “F”
Off right now, everything is mixedCOPY CODEadd_filter( 'I'm looking for', 'my_custom_ids', 10, 2 ); function my_custom_ids( $field_name, $field_value = '' ) { ...
HDcmsParticipantHI,
I think I have found the solution that worksCOPY CODE... if (!is_admin() AND is_singular() AND !is_page() AND ($catSiteWeb OR $catDoc OR $catLieu) ) { $toutContenu .= "<div style='display: inline-block!important;width: 600px;' > </div>" .$apresContenu ; } ...
Do not see any problems?
RegardsHDcmsParticipantHI,
More generally.
I try to apply the methods for BP 2.6+ masking lines of the selector.
It works with a theme but not with twenty sweetdate (child or parent)
Thank you for your helpCOPY CODEadd_filter( 'bp_get_activity_show_filters_options', 'bpfr_remove_filters_options', 50, 2 ); function bpfr_remove_filters_options( $filters, $context ) { /* * @param string $context Context for the filter. 'activity', 'member', 'member_groups', 'group'. */ // if ( 'activity' == $context AND pmpro_hasMembershipLevel(array('0','1'))) { if ( 'activity' == $context ) { // commenter les lignes qu'on veut afficher $remove_these = array( //'New Members' => __( 'New Members', 'buddypress' ), 'Profile Updates' => __( 'Profile Updates', 'buddypress' ), // 'Updates' => __( 'Updates', 'buddypress' ), 'Friendships' => __( 'Friendships', 'buddypress' ), 'Group Updates' => __( 'Group Updates', 'buddypress' ), 'New Groups' => __( 'New Groups', 'buddypress' ), 'Group Memberships' => __( 'Group Memberships','buddypress' ), 'Posts' => __( 'Posts', 'buddypress' ), 'Comments' => __( 'Comments', 'buddypress' ), ); foreach ( $filters as $key => $val ) { if ( in_array( $val, $remove_these ) ) unset( $filters[ $key ] ); } } return $filters; }
HDcmsParticipantHI,
I had already tried and it does not work?
and how to hide the members of counter top of the page activity (http://seventhqueen.com/demo/sweetdatewp/activity/)
COPY CODEactivity-all span{ display: none; /* Does not work*/ }
HDcmsParticipantHi,
I am also hide follow rss
I tried several codes including this oneCOPY CODEul.sub-nav li.feed { display: none !important; }
does not works 🙁
HDcmsParticipantHI,
Thanks for your answer.
I have done several test. It does not work
Apparently is_page does not work in the child theme function.php !?COPY CODEfunction my_page_template_redirect() { if (is_page(10)) // is_page('groupes') { // wp_redirect( home_url( '/inscription/' ) ); // wp_redirect('http://127.0.0.1/wordpress/wp_test/inscription/' ); echo '<h2>PAGE 10</h2>'; // exit(); } } add_action( 'template_redirect', 'my_page_template_redirect' );
HDcmsParticipantHi,
It does not work :COPY CODEglobal $post; $p = $post->ID; echo '<br>$p: ' .$p; $Getid = get_the_ID(); echo '<br>Getid: ' .$Getid;
It work:
COPY CODE$url = explode('?', 'http://'.$_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]); $ID = url_to_postid($url[0]); echo '$ID: ' .$ID;
but not:
COPY CODEif ( is_page($ID) ) { echo '$ID: ' .$ID; echo '<h2>PAGE 10</h2>'; //wp_redirect(pmpro_url("levels")); //exit; }
??
HDcmsParticipantHi,
ok for 2 /
I had forgotten !
Sorry
Still not display the thumbnail of the video in blog mansonary
I copied your code above, is that right? :COPY CODE<?php /** * The template Masonry blog item * * @package WordPress * @subpackage Kleo * @since Kleo 1.0 */ ?> <article id="post-<?php the_ID(); ?>" <?php post_class(array("post-item")); ?>> <div class="post-content animated animate-when-almost-visible el-appear"> <?php global $kleo_config; $kleo_post_format = get_post_format(); /* For portfolio post type */ if ( get_post_type() == 'portfolio' ) { if ( get_cfield( 'media_type' ) && get_cfield( 'media_type' ) != '' ) { $media_type = get_cfield( 'media_type' ); switch ( $media_type ) { case 'slider': $kleo_post_format = 'gallery'; break; case 'video': case 'hosted_video': $kleo_post_format = 'video'; break; } } } switch ( $kleo_post_format ) { case 'video': //oEmbed video // **************** DEBUT MODIF HD ***************************** // init $video = get_cfield( 'embed' ); $video = get_cfield('video_url'); // ****************** FIN MODIF HD ***************************** // video bg self hosted $bg_video_args = array(); $k_video = ''; if (get_cfield( 'video_mp4' ) ) { $bg_video_args['mp4'] = get_cfield( 'video_mp4' ); } if (get_cfield( 'video_ogv' ) ) { $bg_video_args['ogv'] = get_cfield( 'video_ogv' ); } if (get_cfield( 'video_webm' ) ) { $bg_video_args['webm'] = get_cfield( 'video_webm' ); } if ( !empty( $bg_video_args ) ) { $attr_strings = array( 'preload="none"' ); if (get_cfield( 'video_poster' ) ) { $attr_strings[] = 'poster="' . get_cfield( 'video_poster' ) . '"'; } $k_video .= '<div class="kleo-video-wrap"><video ' . join( ' ', $attr_strings ) . ' controls="controls" class="kleo-video" style="width: 100%; height: 100%;">'; $source = '<source type="%s" src="%s" />'; foreach ( $bg_video_args as $video_type => $video_src ) { $video_type = wp_check_filetype( $video_src, wp_get_mime_types() ); $k_video .= sprintf( $source, $video_type['type'], esc_url( $video_src ) ); } $k_video .= '</video></div>'; echo $k_video; } // oEmbed elseif ( !empty( $video ) ) { global $wp_embed; echo apply_filters( 'kleo_oembed_video', $video ); } break; case 'audio': $audio = get_cfield('audio'); if (!empty($audio)) { ?> <div class="post-audio"> <audio preload="none" class="kleo-audio" id="audio_<?php the_id();?>" style="width:100%;" src="<?php echo $audio; ?>"></audio> </div> <?php <?php if ($kleo_post_format != 'quote' && $kleo_post_format != 'link' ) : ?> <div class="post-header"><!--end post-header--> <?php if ( $kleo_post_format != 'status' ): ?> <?php if (kleo_excerpt() != '<p>') : ?> <div class="post-info"> <div class="entry-summary"> <?php echo kleo_excerpt(); ?> </div><!-- .entry-summary --> </div><!--end post-info--> <?php endif; ?> <?php endif; ?> <?php endif; ?> <div class="post-footer"> <small> <?php do_action('kleo_post_footer');?> <a href="<?php the_permalink();? rel="nofollow">"><span class="muted pull-right"><?php _e( "Read more","kleo_framework" );?></span></a> </small> </div><!--end post-footer--> <!--end post-content--> </article>
HDcmsParticipantHI,
Yes you are right !!
This code was working before a version change
Will you tell me what is wrong
Regardspost-content-masonry.php
COPY CODEcase 'video': //oEmbed video // **************** DEBUT MODIF HD ***************************** // init $video = get_cfield( 'embed' ); $video = get_field('video_url'); // ****************** FIN MODIF HD ***************************** case 'link': // ******************* DEBUT MODIF HD ***************************** $image = get_field('img-site'); echo '<a href="'. get_permalink() .'" class="element-wrap">' . '<img src="' . $image . '">' . kleo_get_img_overlay() . '</a>'; .... // ******************* FIN MODIF HD ***************************** /* echo '<div class="inner-content">' . get_the_content() . '</div><!--end inner-content-->'; break; */ .... case 'image': default: if ( kleo_get_post_thumbnail_url() != '' ) { echo '<div class="post-image">'; // ******************* DEBUT MODIF HD ***************************** $img_url = kleo_get_post_thumbnail_url(); $image = get_field('image'); /* $image = aq_resize( $img_url, $kleo_config['post_gallery_img_width'], null, true, true, true ); */ // ******************* FIN MODIF HD ***************************** ....
HDcmsParticipantHI,
This works great 🙂
Thank you 🙂If it’s not too long !! maybe can you say why I did not happen to me that it works. Call in a js file with the child theme :
I created the file “am_modal_cnx.js”
COPY CODEjQuery(document).ready(function() { jQuery(".login_panel").click(function() { jQuery("#login_panel").reveal(); }); });
in functions.php
COPY CODEfunction am_enqueue_scripts() { if(!is_admin()){ wp_enqueue_script('scripts', get_stylesheet_directory_uri() . '/_spec/js/am_piwik.js', array(), NULL, true); wp_enqueue_script('scripts', get_stylesheet_directory_uri() . '/_spec/js/am_modal_cnx.js', array()); } } add_action('wp_enqueue_scripts', 'am_enqueue_scripts', 101);
HDcmsParticipantHello,
Well I think I managed
I put a different code in style.cssCOPY CODE.article-content a { text-decoration: underline; color: #FF0000; }
The problem was the side of the varnish cache server.
I had whenever purge the cache after each code changeHDcmsParticipantHello,
try to put an underlined link and remove for buddypress.
But there is always an element which is undesirableCOPY CODE#main a:link { color: blue; text-decoration: underline ; } #main a:hover { font-weight:bold; } #main a:link { color: blue; text-decoration: underline ; } #main a:hover { font-weight:bold; } .accordion #subnav .profile #profile a:link { text-decoration: none ; } .profile li #profile a:hover { text-decoration: none ; }
Do you have a class that identifies the contents of an post?
Is it that there would be a way to add (in css3 !) a link Underline only the content of an post, without breaking the site.
I can go in the code of each item but it will become quickly complicated?
RegardsHDcmsParticipantHi,
I replacedCOPY CODEcase 'image': default: if ( kleo_get_post_thumbnail_url() != '' ) { echo '<div class="post-image">'; $img_url = kleo_get_post_thumbnail_url(); $image = aq_resize( $img_url, $kleo_config['post_gallery_img_width'], null, true, true, true ); if( ! $image ) { $image = $img_url; } echo '<a href="'. get_permalink() .'" class="element-wrap">' . '<img src="' . $image . '">' . kleo_get_img_overlay() . '</a>'; echo '</div><!--end post-image-->'; }
by
COPY CODEdefault: $image = get_field('image'); // ok cela fonctionne echo '<a href="'. get_permalink() .'" class="element-wrap">' . '<img src="' . $image . '">' . kleo_get_img_overlay() . '</a>'; break;
it seems to work
I did not understand what use has removed the code.
I hope this is not a problem! ??HDcmsParticipantHI,
This is the video that it was easier !! 🙂
COPY CODE.... // modif HD OK $video = get_field('video'); // video bg self hosted $bg_video_args = array(); $k_video = ''; if (get_cfield( 'video_mp4' ) ) { $bg_video_args['mp4'] = get_cfield( 'video_mp4' ); } if (get_cfield( 'video_ogv' ) ) { ...
I still can not recover an image of a picture field ACF
I replaceCOPY CODEecho '<a href="'. get_permalink() .'" class="element-wrap">' . '<img src="' . $image . '">' . kleo_get_img_overlay() . '</a>';
with
`$image = get_field(‘ecran-site’);
echo ‘<a href=”‘. get_permalink() .'” class=”element-wrap”>’
. ‘<img src=”‘ . $image . ‘”>’
. kleo_get_img_overlay()
. ‘</a>’;`HDcmsParticipantHello,
Well I have problems. I have
1) creates a new directory
wp-content/themes/kleo-child/page-parts
2) transfer the edited file
post-content-masonry.phpThere are no video appears
COPY CODE// $k_video .= '<div class="kleo-video-wrap"><video ' . join( ' ', $attr_strings ) . ' controls="controls" class="kleo-video" style="width: 100%; height: 100%;">'; $k_video .= '<div class="kleo-video-wrap"><video ' . get_field('video') . ' controls="controls" class="kleo-video" style="width: 100%; height: 100%;">';
Regards
HDcmsParticipantHI,
Thank you 🙂
I’ll watch.
I try to centralize all the hacks in functions.php
The ideal would be to have a function like I did for a post:COPY CODEfunction affic_champs_acf_video($content) { /*champs à affichés pour une vidéo */ $content .='<div class="video, embed-container">'; $content .= get_field('video') ; $content .='</div>'; return $content; } ... if ( $format=== 'video' ) { add_filter('the_content', 'affic_champs_acf_video'); }
HDcmsParticipantHI,
Well I got there but the page display time can be slow 🙁
Do you have a better solution (especially with kleo function)! ??COPY CODEadd_filter( 'the_content', 'my_the_content_filter', 20 ); function my_the_content_filter( $content ) { if ( is_single() ) $content = get_the_excerpt() .$content ; return $content; }
Regards
-
AuthorPosts