Forum Replies Created

Viewing 6 replies - 16 through 21 (of 21 total)
  • Thread Starter wordpresskid

    (@wordpresskid)

    Hello Menaka,

    and thank you for your quick answer!

    Right now I can not post a link to the site, but the same problem you’ll find in the demo.

    When the screen size is less then 768px, the .social-block div remains left-aligned, while the .credits get centered. I would like to have both divs centered one above the other.

    Trying different css properties on .social-block will have consequences on .credits too. I thought before trying out all the css workarounds to ask first here in the forum for help and experience πŸ™‚

    Thank you!

    Thread Starter wordpresskid

    (@wordpresskid)

    Thank you Menaka,

    this is working.

    Greetings

    Hi Menaka,

    and thank you for your solution. I had to do same think as you post your solution above with the action __comment. Your solution is working when there is at least 1 comment posted, otherwise the disclaimer line will not be rendered.

    With the filter ‘comment_form_field_comment’ looks OK:

    //add your disclaimer after the comment textarea
    add_filter( 'comment_form_field_comment', 'insert_after_comment_textarea' );
    function insert_after_comment_textarea( $comment_field ) {
        return $comment_field.'<p class="comment-disclaimer">By posting your answer, you agree to our <a href="http://example.com/privacy/">privacy policy</a> </p>';
    }

    Hi helices,

    isn’t it in single.php?

    Marius

    Thread Starter wordpresskid

    (@wordpresskid)

    Thank you Ben for your advice,

    I found the magic wordpress function to return the ID of the home page: get_option(‘page_on_front’) :). Thank you again for your help and for all other wordpress beginners, who want to implement breadcrumbs in a theme without using a plugin, then put this in functions.php:

    // breadcrumbs (Ben Sibley,  https://www.competethemes.com)
    if ( ! function_exists( 'ct_ignite_breadcrumbs' ) ) {
    	function ct_ignite_breadcrumbs( $args = array() ) {
    
    		if ( is_front_page() ) {
    			return;
    		}
    		if ( get_theme_mod( 'ct_ignite_show_breadcrumbs_setting' ) == 'no' ) {
    			return;
    		}
    
    		global $post;
    		$defaults  = array(
    			'separator_icon'      => '>',
    			'breadcrumbs_id'      => 'breadcrumbs',
    			'breadcrumbs_classes' => 'breadcrumb-trail breadcrumbs',
    			'home_title'          => 'Home'
    		);
    		$args      = apply_filters( 'ct_ignite_breadcrumbs_args', wp_parse_args( $args, $defaults ) );
    		$separator = '<span class="separator"> ' . esc_attr( $args['separator_icon'] ) . ' </span>';
    
    		/***** Begin Markup *****/
    
    		// Open the breadcrumbs
    		$html = '<div id="' . esc_attr( $args['breadcrumbs_id'] ) . '" class="' . esc_attr( $args['breadcrumbs_classes'] ) . '">';
    
    		// Add Homepage link & separator (always present)
    		$html .= '<span class="item-home"><a class="bread-link bread-home" href="' . get_home_url() . '" title="' . esc_attr( $args['home_title'] ) . '">' . esc_attr( $args['home_title'] ) . '</a></span>';
    		$html .= $separator;
    
    		// Post
    		if ( is_singular( 'post' ) ) {
    
    			$category = get_the_category();
    			$category_values = array_values( $category );
    			$last_category = end( $category_values );
    			$cat_parents = rtrim( get_category_parents( $last_category->term_id, true, ',' ), ',' );
    			$cat_parents = explode( ',', $cat_parents );
    
    			foreach ( $cat_parents as $parent ) {
    				$html .= '<span class="item-cat">' . wp_kses( $parent, wp_kses_allowed_html( 'a' ) ) . '</span>';
    				$html .= $separator;
    			}
    			$html .= '<span class="item-current item-' . $post->ID . '"><span class="bread-current bread-' . $post->ID . '" title="' . get_the_title() . '">' . get_the_title() . '</span></span>';
    		} elseif ( is_singular( 'page' ) ) {
    
    			if ( $post->post_parent ) {
    				$parents = get_post_ancestors( $post->ID );
    				$parents = array_reverse( $parents );
    
    				foreach ( $parents as $parent ) {
    					if ($parent != get_option('page_on_front')) {
    						$html .= '<span class="item-parent item-parent-' . esc_attr( $parent ) . '"><a class="bread-parent bread-parent-' . esc_attr( $parent ) . '" href="' . esc_url( get_permalink( $parent ) ) . '" title="' . get_the_title( $parent ) . '">' . get_the_title( $parent ) . '</a></span>';
    						$html .= $separator;
    					}
    				}
    			}
    			$html .= '<span class="item-current item-' . $post->ID . '"><span title="' . get_the_title() . '"> ' . get_the_title() . '</span></span>';
    		} elseif ( is_singular( 'attachment' ) ) {
    
    			$parent_id        = $post->post_parent;
    			$parent_title     = get_the_title( $parent_id );
    			$parent_permalink = esc_url( get_permalink( $parent_id ) );
    
    			$html .= '<span class="item-parent"><a class="bread-parent" href="' . esc_url( $parent_permalink ) . '" title="' . esc_attr( $parent_title ) . '">' . esc_attr( $parent_title ) . '</a></span>';
    			$html .= $separator;
    			$html .= '<span class="item-current item-' . $post->ID . '"><span title="' . get_the_title() . '"> ' . get_the_title() . '</span></span>';
    		} elseif ( is_singular() ) {
    
    			$post_type         = get_post_type();
    			$post_type_object  = get_post_type_object( $post_type );
    			$post_type_archive = get_post_type_archive_link( $post_type );
    
    			$html .= '<span class="item-cat item-custom-post-type-' . esc_attr( $post_type ) . '"><a class="bread-cat bread-custom-post-type-' . esc_attr( $post_type ) . '" href="' . esc_url( $post_type_archive ) . '" title="' . esc_attr( $post_type_object->labels->name ) . '">' . esc_attr( $post_type_object->labels->name ) . '</a></span>';
    			$html .= $separator;
    			$html .= '<span class="item-current item-' . $post->ID . '"><span class="bread-current bread-' . $post->ID . '" title="' . $post->post_title . '">' . $post->post_title . '</span></span>';
    		} elseif ( is_category() ) {
    
    			$parent = get_queried_object()->category_parent;
    
    			if ( $parent !== 0 ) {
    
    				$parent_category = get_category( $parent );
    				$category_link   = get_category_link( $parent );
    
    				$html .= '<span class="item-parent item-parent-' . esc_attr( $parent_category->slug ) . '"><a class="bread-parent bread-parent-' . esc_attr( $parent_category->slug ) . '" href="' . esc_url( $category_link ) . '" title="' . esc_attr( $parent_category->name ) . '">' . esc_attr( $parent_category->name ) . '</a></span>';
    				$html .= $separator;
    			}
    			$html .= '<span class="item-current item-cat"><span class="bread-current bread-cat" title="' . $post->ID . '">' . single_cat_title( '', false ) . '</span></span>';
    		} elseif ( is_tag() ) {
    			$html .= '<span class="item-current item-tag"><span class="bread-current bread-tag">' . single_tag_title( '', false ) . '</span></span>';
    		} elseif ( is_author() ) {
    			$html .= '<span class="item-current item-author"><span class="bread-current bread-author">' . get_queried_object()->display_name . '</span></span>';
    		} elseif ( is_day() ) {
    			$html .= '<span class="item-current item-day"><span class="bread-current bread-day">' . get_the_date() . '</span></span>';
    		} elseif ( is_month() ) {
    			$html .= '<span class="item-current item-month"><span class="bread-current bread-month">' . get_the_date( 'F Y' ) . '</span></span>';
    		} elseif ( is_year() ) {
    			$html .= '<span class="item-current item-year"><span class="bread-current bread-year">' . get_the_date( 'Y' ) . '</span></span>';
    		} elseif ( is_archive() ) {
    			$custom_tax_name = get_queried_object()->name;
    			$html .= '<span class="item-current item-archive"><span class="bread-current bread-archive">' . esc_attr( $custom_tax_name ) . '</span></span>';
    		} elseif ( is_search() ) {
    			$html .= '<span class="item-current item-search"><span class="bread-current bread-search">Search results for: ' . get_search_query() . '</span></span>';
    		} elseif ( is_404() ) {
    			$html .= '<span>' . __( 'Error 404', 'ignite' ) . '</span>';
    		} elseif ( is_home() ) {
    			$html .= '<span>' . get_the_title( get_option( 'page_for_posts' ) ) . '</span>';
    		}
    
    		$html .= '</div>';
    		$html = apply_filters( 'ct_ignite_breadcrumbs_filter', $html );
    
    		echo wp_kses_post( $html );
    	}
    }

    and call the function in a child theme file like header.php or content-page.php or wherever you want to have the breadcrumbs:

    <?php ct_ignite_breadcrumbs(); ?>

    and don’t forget to customize your breadcrumbs css classes πŸ™‚

    Have a nice day Ben and maybe I’ll consider one of your theme for my next project, they are so clean and modern πŸ™‚

    Marius

    Thank you Takayuki Miyoshi for this great plugin !

    The plugin works and has a very intuitive documentation except the part with the date format. For me is not clear how to handle with the date format because it doesn’t work like in the docs.

    I try to set the input date format to “d.m.Y”

    this will be rendered as an input field, but with the standard date format:
    [date c7-date class:c7-datefield placeholder “Geburtsdatum z.B. 01.01.1990”]

    none of them will work, this tags are rendered as text:
    [date c7-date class:c7-datefield placeholder “Geburtsdatum z.B. 01.01.1990”]

    [_format_c7-date “d.m.Y” class:c7-datefield placeholder “Geburtsdatum z.B. 01.01.1990”]

    [_format_c7-date “d.m.Y”]

    Do I need the second plugin(contact-form-datepicker) to get this work?
    Or maybe I didn’t understand the docs? Or is this a bug?

Viewing 6 replies - 16 through 21 (of 21 total)