-disabled all plugins
-removed white space in functions.php
-increased memory limit
-tried other themes
none of these things have resulted in a working site. Any help would be greatly appreciated!!
]]>I’m searching to develop a slider in the home of a custom theme, which shows the subcategories of parent cat.(ex. Articles) with their featured image.(In the link see the slider under the title “In Piemonte Puoi”, is only static html with a framework, I’m working on wordpress on localhost)
I tried to show posts from a test category, slider, changing the links in the preview, but I didn’t have success.
Here is the code of the loop for the slider showing the posts from the category slider
<?php
// La Query
$ipp_the_query = new WP_Query( 'category_name=slider&posts_per_page=6' );
// Il Loop
while ( $ipp_the_query->have_posts() ) :
$ipp_the_query->the_post(); ?>
<?php $ipp_image_attributes = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'ipp_small' ); ?>
<li class="uk-padding-large">
<a href="<?php the_permalink(); ?>">
<img src="<?php echo $ipp_image_attributes[0]; ?>" alt="" uk-svg>
</a>
<div class="uk-position-center uk-panel">
<div><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></div>
</div>
</li>
<?php endwhile;
// Ripristina Query & Post Data originali
wp_reset_query();
wp_reset_postdata(); ?>
I would find a method to loop the subcategories(with their featured images) of a parent like the posts of the category slider in the code.
Another solution may be change the link of the content preview(cat. slider) to the subcategories.
Thanks for the help!
Carlo
is there a shortcode I could use for a custom written theme?
Kind Regards,
Isabel
I am building a custom theme for a new client and im trying to implement the awesome typed.js within the code of my theme. so this is what i have got in my code so far..
In my header.php I am calling this…
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
In my front-page.php where I want the typed.js to work I have this….
<script src="<?php echo get_template_directory_uri(); ?>/js/typed.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
$("#typing").typed({
stringsElements:("#typed-strings"),
typeSpeed:30,
backDelay:500,
loop:true,
showCursor:true,
});
});
</script>
<section id="typed-wrapper"><h1 class="welcome">Welcome to Monkeypants we: <span id="typing style=white-space:pre"></span></h1></section>
<section id="typed-strings">
<h2>Phrase or Sentence 1</h2>
<h2>Phrase or Sentence 2</h2>
<h2>Phrase or Sentence 3</h2>
<h2>Phrase or Sentence 4</h2>
<h2>Phrase or Sentence 5</h2>
</section>
</section>
You can see my issues here with this screengrab.
Im assuming it’s a jQuery conflict but I know that I am only calling the 1 jquery cdn link as this is a custom built theme that I am developing from the groundup.
Many thanks for any help.
Phillip Dews
I have no idea why it is outputting two of the attached images for each.
Here is the code for this specific part of front-page.php:
<div class="row">
<?php $latest = new WP_Query('showposts=2'); ?>
<?php while( $latest->have_posts() ) : $latest->the_post(); ?>
<a href='<?php echo get_permalink(); ?>'>
<div class="col-md-6 blog-wrap">
<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' ); ?>
<div class="home-featured-img" style="background: url(<?php echo $src[0];?>);"></div>
<div class="excerpt-home">
<?php get_template_part( 'content', get_post_format() ); ?>
</div>
</div></a>
<?php endwhile; ?>
</div>
I have a feeling that the problem occurs when I call:
<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), array( 5600,1000 ), false, '' ); ?>
<div class="home-featured-img" style="background: url(<?php echo $src[0];?>);"></div>
I only want for the post to display the image from this (which is the top picture):
If you need any other code snippets from my custom theme, please let me know.
Any and all suggestions are greatly appreciated.
]]>I would like to have my site title be an image rather than text. is there a way to do this?
thanks
ko
]]>