WooCommerce checkout scattered styles - php

I have an problem with scattered styles in WooCommerce checkout
I think in code it's okay but I updated from some version of WooCommerce before 3.5.0 and now I have so scattered design on checkout..
Take a look on image here:
The code of form-checkout.php is:
<div class="col-md-8 mb-3">
<div class="sh p-5 ovh">
<div class="">
<?php if ($checkout->get_checkout_fields()) : ?>
<?php do_action('woocommerce_checkout_before_customer_details'); ?>
<div class="col2-set" id="customer_details">
<div class="col-1">
<?php do_action('woocommerce_checkout_billing'); ?>
</div>
<div class="col-2">
<?php do_action('woocommerce_checkout_shipping'); ?>
</div>
</div>
<?php do_action('woocommerce_checkout_after_customer_details'); ?>
<?php endif; ?>
</div>
</div>
</div>
In code everything looks okay, I tried google but found nothing about this specific problem..
Any advices?

Related

Bootstrap is not applied to automatically generated cards via php

I am generating new cards with PHP code, but they do not listen to the grid of bootstrap 4.
Raw html code works fine and displays them like they should be.
<div class="container-fluid padding">
<div class="row padding">
<?php foreach ($contacts as $contact): ?>
<div class="col-sm-12 col-md-4">
<div class="card">
<?php echo '<img class="card-img-top" src="data:image/png;base64,'.base64_encode( $contact['horse_image'] ).'"/>'; ?>
<div class="card-body">
<h4 class="card-title"><?=$contact['horse_name']?></h4>
<p class="card-text"><?=$contact['short']?></p>
</div>
</div>
</div>
</div>
<?php endforeach; ?>
</div>
<hr class="my-4">
</div>
This is the code for generated cards from database, it works just fine but bootstrap is not applied on that so it looks very bad like that but it should be looking like that
Is there a way to apply bootstrap after the cards are generated?
Sorry, can't comment yet because of the reputation of 50 :D
In your foreach block is one closing div tag too much ;)

To display page breadcrumb dynamically different for each page through header.php

I'm beginner with php, so I guess this will sound a dumb question for most people. I want to add a custom breadcrumb for each page dynamically through header.php file, and want to pass the page name through particular page.
I tried to do this but it is giving an error.
<div class="page-title">
<div class="auto-container">
<div class="row clearfix">
<div class="col-md-6 col-sm-6 col-xs-12 pull-left">
<h1>
<?php echo $pagetitle ?>
</h1>
</div>
<div class="col-md-6 col-sm-6 col-xs-12 pull-right text-right path">
Home 
<span class="fa fa-angle-right"></span> 
<?php echo $page->title ?>
</div>
</div>
</div>
</div>
And passed $title="page title " in specific pages.
Please suggest some solution.
You seem to be using $pagetitle and $page->title in your code, but you're passing $title in your pages.
You should just use <?php echo $title; ?>, or its short form: <?= $title ?>

Displaying wordpress page full contents

Here is LINK I am working on it. The About Us section is not displaying full contents and showing more button to go to next page whereas I want to show full contents of About Us page instead of short summary.
I checked a lot but not found any option in the theme to fix it
UPDATE:
I found this in (page-template/custom-home-page.php)
<?php while ( $query->have_posts() ) : $query->the_post(); ?>
<div class="row">
<div class="col-lg-8 col-md-7">
<h3><?php the_title(); ?></h3>
<hr>
<p><?php the_excerpt(); ?></p>
<div class="more-btn">
<?php esc_html_e('MORE','vw-one-page'); ?>
</div>
</div>
<div class="col-lg-4 col-md-5">
<img src="<?php the_post_thumbnail_url('full'); ?>"/>
</div>
</div>
<?php $i++; endwhile;
wp_reset_postdata();?>
<?php else : ?>
<div class="no-postfound"></div>
<?php endif;
endif;?>
</div>
</section>
Best regards
That code inside your theme with high probability.
Try to search inside theme files "/wp-content/themes/your_theme_name", something like that:
<div class="col-lg-8 col-md-7">
<h3>About Us</h3> <!-- Or <?php the_title(); ?> -->
<hr>
<?php the_exerpt(); ?>
<div class="more-btn">
MORE <!-- Or something like <?php the_permalink( ... ) ?> -->
</div>
</div>
This is an example. After all, I can't know how it is done in your theme.
Then <?php the_exerpt(); ?> change to <?php the_content(); ?>. and remove or hide:
<div class="more-btn">
...
</div>
But if this is not your personal WordPress theme, then it is better to do through Child Theme

Fonts is getting blur when google map iframe is loaded

I've notice something strange in one of my page.
The fonts in the page is getting very blur after google maps is loaded.
The page:
http://aranrd.wpengine.com/contact/
You can see that at the moment google maps is loaded, the fonts inside it's section, inside the grey area, getting blur.
This is a page template I've build for the contact page.
<?php get_header(); ?>
<div class="container">
<div id="contact-page">
<h1><?php _e( 'CONTACT', 'aran-rd' ); ?></h1>
<div id="primary" class="content-area contact-inner">
<div class="row top-row">
<div class="col-sm-6">
<?php echo do_shortcode('[gravityform id=2 title=false description=false ajax=false]'); ?>
</div>
<div class="col-sm-6">
<!-- google maps iframe -->
<iframe src="https://www.google.com/maps/d/u/1/embed?mid=zWesdBo33x1E.kHaxSgqiUyNY" width="640" height="280"></iframe>
<div class="row inner-row">
<div class="col-sm-6">
<div class="location-details">
<?php _e( '43 Haeshel Street,<br/>Caesarea Buisness Park<br/>P.O.B 3067', 'aran-rd'); ?>
</div>
</div>
<div class="col-sm-6">
<div class="contact-details">
<?php _e( 'Tel: 972-4-623-9000,<br/>Fax: 972-4-627-3260<br/>E-mail: info#aran-rd.com', 'aran-rd'); ?>
</div>
</div>
</div><!--.inner-row-->
</div>
</div>
</div><!--#primary-->
</div><!--#contact-page-->
</div><!--.container-->
<?php get_footer(); ?>
Anyone knows what's going on?
Removing the margin-bottom from top-row solve the problem, no idea why.

Unknown output of <em> in wordpress theme

on my new theme in wordpress a <em> Tag is outputed, but i don't know why...
I dont use any <em> Tags anywhere in my theme, so i can't understand why this is outputed and destroys my design.
Here the Content of my index.php
<?php get_header(); ?>
<div class="row">
<div class="col-sm-12 blog-content">
<div class="container">
<div class="col-sm-8 blog-main">
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="col-sm-12 blog-post">
<div class="date">
<div class="corner"></div>
<?php the_date('d M Y'); ?>
</div>
<h2><?php the_title(); ?></h2>
<div class="meta">
<i class="icon-user"></i>
<span><?php the_author(); ?></span>
<i class="icon-bookmark"></i>
<span><?php the_category(', '); ?></span>
<i class="icon-bubble"></i>
<?php comments_number('0 Kommentare', '1 Kommentare', '(% Kommentare)' );?>
</div>
<div class="entry">
<?php echo apply_filters('the_content', substr(get_the_content(), 0, 400) ); ?>
</div>
<div class="row">
<div class="col-sm-offset-8 col-sm-4 col-md-offset-9 col-md-3 col-lg-offset-9 col-lg-3 more">
<div class="btn">
Mehr lesen
</div>
</div>
</div>
</div>
<?php endwhile; endif; ?>
</div>
<div class="col-sm-3 col-sm-offset-1 blog-sidebar">
<?php get_sidebar(); ?>
</div>
</div>
</div>
</div>
<?php get_footer(); ?>
Here you can watch my problem live. thorstenreichelt.de
Thanks for Help ;)
There is a em tag in your content (not in your theme). As you truncate it for the preview, in the first 400 characters you have the opening em tag but not the closing one, so the final HTML and your design are "broken".
Have a look at strip_tags() PHP function, or any equivalent used in Wordpress theming functions.
Try add this:
remove_filter ('the_content', 'wpautop');
remove_filter ('comment_text', 'wpautop');
at the final of the functions.php file from your theme.
Could it be that you're pasting in some content to that post from somewhere, and its some formatting thats coming across with it.
Have you gone into edit that post and click "text" in the top right corner of the main editing area, next to where it says visual. Is there a stray tag there?

Categories