There is a pattern node is inserted into the slider (in an item):
<div class="item"> <!-- Wrap contents -->
<div class="image"> <!-- Insert image-->
<img src="<?=file_create_url($content['field_img_slide_1']['#items'][0]['uri'])?>"alt=""/>
</div>
<div class="desc">
<h2><?=$content['field_h1_slide_1']["#items"][0][value];?></h2> <!--Insert title-->
<div class="info"><?=$content['field_h2_slide_1']["#items"][0][value];?></di><!--Insert title 2-->
<?=$content['body']["#items"][0][value];?> <!--Insert text -->
</div>
</div>
The code of the slider:
<div class="m-slider">
<div class="sliderBox">
<?php print render(module_invoke('views', 'block_view', 'flock_salon-block_1')); // These items are inserted for the slider ?>
</div>
</div>
When I have only one slide, everything is displayed perfectly. When I add the second slide, it is displayed under the first (incorrectly displayed)
Slider screenshot: http://i65.fastpic.ru/big/2014/0807/96/25ac215abd233ee409ed3dd6459ced96.png
The second slide lies on top of the first
What prescribe in the template node to fix slider displaying?
This most often occurs when there are errors in running javascript code or finding a javascript file/library. Open up your developer tools (F12 in most major browsers) and check the console for errors that may be halting your code before it gets to rendering the slider functionality.
Related
I'm using contact form 7 plugins, I create form and then save the generated code in the contact page. But, in the preview page didn't show any form.
You just missed out the the_content function to call. Please add this code in your template file from container start to container end. Please check the HTML as per your design .
<div class="contianer"><!--container start here -->
<div class="row">
<!-- map column -->
<div class="col-lg-8 mb-4">
<!-- google map iframe goes here -->
</div>
<!-- contact details here -->
<div class="col-lg-4 mb-4">
<?php the_content(); ?>
</div>
</div>
</div> <!--container end here -->
<?php endwhile; endif; ?>
You need to add the Wordpress loop somewhere in that contact-us.php template, otherwise WP won't load what you define as content in the WP editor (which in your case is the content form)
I already made a homepage including the grid system of bootstrap, but now im using mainly includes to keep everything tidy but the grid system doesnt seem to work at all. even if i copy the example code of bootstrap itself.
this is the first code of my content php file. including obviously the row part. These are stacked ontop of eachother not next to eachother.
PS: the .content-wrapper has no styling yet so its not affecting anything and the .content has only top and bottom padding.
<div class="content-wrapper">
<div class="content">
<h1>The Test Heading</h1>
<p>
text
</p>
</div>
<div class="row">
<div class="col-sm-6 col-md-6">
<div class="thumbnail">
<img src="..." alt="...">
<div class="caption">
<h3>Thumbnail label</h3>
<p>...</p>
<p>Button Button</p>
</div>
</div>
<div class="thumbnail">
<img src="..." alt="...">
<div class="caption">
<h3>Thumbnail label</h3>
<p>...</p>
<p>Button Button</p>
</div>
</div>
</div>
</div>
here is the index.php file i got with the content area
<div class="container">
<!-- Navigation area -->
<?php include_once ("php/navigation.php");?>
<!-- Carousel -->
<?php include_once ("php/carousel.php");?>
<!-- Content area -->
<?php include_once ("php/content.php");?>
</div> <!-- end of container -->
im not sure if it has to do something with including a file and the grid system, but carousel, container etc all working fine so it should find the css file after being included.
Sidequestion: is a method like this useful? working with includes only? or is it rather non-practical?
So what do u want to do with grid system, because you only have one col so it will just go from begining of file to col 6 it will look like it doesnt do anything rly? You can put lets say and then your div with col and it will move it and so on.
I haven't been able to find this specific question on here yet so I thought I might post about it on here and see if I could get some supportive feedback/help.
I need this blog to be responsive and only show so many posts and a specific screen size. I assume I need to do this within the php code. I would like to have the blog I have looping on the front page to display 3 blogs from 800PX and up (screen width), 2 blogs display 450px-800px, and 1 blog display at 300px. Roughly.
I find this easy to do with just plain html and css but I am new to this loop coding/php coding with wordpress and find this sort of confusing. I assume I need to ad some sort of "if this is this, then do this" in the php code?
In my plain demo html page I did it fine, but this is a whole new ball game.
Here is my demo site. Scroll down toward the bottom and resize your screen to see what I mean.
Here is the actual Div site. Right now I have it responsive as it will resize, but it gets too sloppy as it gets smaller and would visually loop better to display only 2 as the screen gets smaller, and then 1 for mobile.
Here is the PHP and the loop code. Can one of you awesome individuals that truly know what your doing point me in the right direction? Then, can you give me advice on a book or something I can read to get better at this stuff so I don't come here bothering you all the time.
<!-- BEGIN BLOG CALL-OUT SECTION -->
<div id="blog_section" class="clearfix">
<div class="blog_posts_container">
<?php
$rp_query = new WP_Query( 'showposts=3' );
if ( have_posts() ) : while ( $rp_query->have_posts() ) : $rp_query->the_post(); ?>
<div class="post-wrapping-div">
<!-- Blog Thumbnail-->
<div class="blog_image image wow fadeIn" data-wow-duration=".5s" data-wow-delay=".5s"><?php the_post_thumbnail('full'); ?></div>
<!-- Blog Post Date/time-->
<p class="post wow fadeIn" data-wow-duration=".5s" data-wow-delay=".6s">
<span class="post_date">Posted <?php the_time('m/j/y g:i A') ?></span><br />
</p>
<!-- Blog Title-->
<p class="home_blog_title_content wow fadeIn" data-wow-duration=".5s" data-wow-delay=".6.5s">
<span class="home_text_title"><?php the_title(); ?></span><br />
</p>
<!-- Blog Content-->
<div class="home_text_content wow fadeIn" data-wow-duration=".5s" data-wow-delay=".7s">
<?php the_excerpt(); ?>
Read More</li>
</div>
</div>
<img class="blog_divider" src="wp-content/themes/CloudPoint_Technology/img/blog_divider.png" class="image">
<?php endwhile; ?> </div>
<? endif; ?>
<?php wp_reset_postdata(); ?>
</div>
<!-- END BLOG CALL-OUT SECTION-->
Open your blog post page in Google Chrome or Firefox. Right click on one of the blog posts and click "Inspect Element" (might be slightly different in Firefox but same idea). This will show you the CSS rules that are being applied to that particular element.
Ensure you have the entire post selected in the inspector. You can do this by finding the element with the class "post" in the HTML displayed in the inspecor window. On the right hand side (using Chrome, and if the inspector window is on the bottom, not the side), you should see all the CSS rules applied to that element. One of them will be the class "post". These are the CSS rules that you want to start modifying first.
Let's say you want 3 posts to be displayed side-by-side, per line, when viewed on a desktop screen of 1024px. You might set the following rules under .post {:
.post {
display: inline-block;
width: 300px;
}
Note that you can make these changes directly in Chrome or Firefox's inspector window. They will not actually modify your site and everything will be reset when you refresh the page, but this will help you test different CSS rules before making the "permanent" changes in your CSS file(s).
Now, since 3 x 300px is less than 1024px, you should see three posts displayed side by side on a desktop size screen, then three on the next line, etc. If you resize your browser window to make it smaller, you should notice that at around 900px wide, the third post will drop down to the second line. If you resize it further to around 600px wide, you'll see the second post drop down to the second line.
Once you have that basic concept down, then you can start doing more sophisticated stuff, but that's the basic idea. The example I gave doesn't even require using media queries, just basic CSS. You can also use things like "max-width" and pixels/percentages to accomplish a lot of "responsiveness" without the need for media queries.
Also important to note is that, by doing what I mentioned in step 2, you should be able to easily determine which CSS file you need to modify, as the name of the file should be on the right next to the CSS selector. So look for something like "style.css" -- whatever ".css" file is listed next to that element is what you need to be modifying.
Here was the final working code (minus the obvious CSS I need to add to make it work).
<!-- BEGIN BLOG CALL-OUT SECTION -->
<div id="blog_section" class="clearfix">
<div class="blog_posts_container">
<?php $rp_query = new WP_Query( 'showposts=3' ); ?>
<?php $post_counter = 0; //Set an initial counter to 0 before the loop ?>
<?php if ( have_posts() ) : while ( $rp_query->have_posts() ) : $rp_query->the_post(); ?>
<?php $post_counter++; ?>
<div class="post-wrapping-div <?php echo 'post-'.$post_counter; ?>">
<!-- Blog Thumbnail-->
<div class="blog_image image wow fadeIn" data-wow-duration=".5s" data-wow-delay=".5s"><?php the_post_thumbnail('full'); ?></div>
<!-- Blog Post Date/time-->
<p class="post wow fadeIn" data-wow-duration=".5s" data-wow-delay=".6s">
<span class="post_date">Posted <?php the_time('m/j/y g:i A') ?></span><br />
</p>
<!-- Blog Title-->
<p class="home_blog_title_content wow fadeIn" data-wow-duration=".5s" data-wow-delay=".6.5s">
<span class="home_text_title"><?php the_title(); ?></span><br />
</p>
<!-- Blog Content-->
<div class="home_text_content wow fadeIn" data-wow-duration=".5s" data-wow-delay=".7s">
<?php the_excerpt(); ?>
Read More</li>
</div>
</div>
<img class="blog_divider" src="wp-content/themes/CloudPoint_Technology/img/blog_divider.png" class="image">
<?php endwhile; ?> </div>
<? endif; ?>
<?php wp_reset_postdata(); ?>
</div>
<!-- END BLOG CALL-OUT SECTION-->
We are currently building a mobile website using Jquery Mobile (1.1.0) and are using a multi-page template. We are using PHP to call MYSQL for dynamic content and have hit a brick wall with a certain object. When trying to call a simple image, it will not display. In viewing the source, it shows the correct image file name, however, it does not display. When removing Jquery Mobile, the image returns fine so I'm positive our variable is correct.
The code below is basically what we are using to call and echo out. ($data is an array with the page detail).
<div data-role="page" id="page">
<div data-role="header" data-position="fixed" class="header">
<div> PHONE NUMBER GOES HERE</div>
</div>
<div data-role="content">
<div class="logo">
<img src="img/logo.png" />
</div>
<h1>Page Title</h1>
<p>:: <span><?php echo $data['img']; ?></span> :: </p>
</div>
</div>
As stated previously, this code produces results in the page source but on the actual page it outputs <span> :: :: </span>. If anyone can help it would be much appreciated.
try:<img src="image_location/<?php echo '.$data['img'].'; ?>"/>
Place the PHP code inside
<div data-role="page" id="page">
// php code here
<!-- All the HTML goes here -->
</div><!-- End of #page -->
Its needed as the page content is loaded using jQuery AJAX call. In that case whatever code is there outside <div data-role="page" id="page"> will not get executed in the AJAX call.
I'm creating a website for a kiosk. I've got 3 divs on one page, everytime when a div is clicked, next div shows up using a photoslide, and the previous div hides away.
My problem is that when the welcome screen (first div) is showing (the whole page/div is an a tag), the status bar down the bottom shows the linking address all the time. I posted another post, people told me it is not possible to hide the status bar.
So my question is how do I set the cursor to be off screen/off set, so the status bar only shows when a visitor is interacting with the screen.
Can I set the cursor offset using javascript, html/css or php? Any code/suggestions is appreciated.
Thanks!
Here is my html page below or see http://jsfiddle.net/EXfnN/8/
<div id="item1" class="item">
<div class="content">
<a href="#item2" class="panel">
<video id="my_Video" width="100%" height="100%" preload="auto" autoplay loop>xxxxxx
</video>
</a>
</div>
</div>
<div id="item2" class="item">
<div class="content">
<div id="back">
<ul id="awesome-menu">
<li>
ABC
</li>
<li>
National
</li>
<li>
Other
</li>
</ul>
</div>
</div>
</div>
<div id="item3" class="item">
<div class="content">
<img src="images/thankyou.jpg" alt="Thank you" /></div>
</div>
I'd suggest that if you're using JavaScript for this, that you don't need ANCHOR tags because you've already negated the need for them.
I'd suggest changing to adding click events to the div tags and storing additional application data on "data-" attributes and reading those with JavaScript instead.
This workaround eliminates a few problems like the one above.
you could make the first element a div only (without the a tag) catch the onclick event and then redirect via javascript (or do whatever action the a tag has)?