Forum Replies Created
-
AuthorPosts
-
evahillParticipant
Thank you for your response.
I have all of the slides for the slideshow in the “uncategorized” category, with featured image and excerpt to display on each slide.
Do I need to create a new post for each “read more” button to be linked to, and also have them in the “uncategorized” category? How do I link the “read more” button to the correct post?
appliedspatialtechnology.com
thank you in advance.
evahillParticipantOK, I looked on youtube on how to fix the parse error, and deleted the child theme from the ftp directory. Yikes!!
How about if we leave the read more button. Can you please show me how to link the read more button to a certain page please.
evahillParticipantMy site is:
evahillParticipantYIKES!! Now the whole site is down, and I am only getting the:
Parse error: syntax error, unexpected T_STRING in /home/content/87/11933087/html/wp-content/themes/business-hub-child/functions.php on line 17
I can’t even change it back to the business hub theme!!
Please help!!!!
evahillParticipantThank you for your reply.
When I add the code you supplied just under the code already there, I get this error:
Parse error: syntax error, unexpected T_STRING in /home/content/87/11933087/html/wp-content/themes/business-hub-child/functions.php on line 17
My entire function.php code looks like this:
<?php
// Exit if accessed directly
if ( !defined( ‘ABSPATH’ ) ) exit;// BEGIN ENQUEUE PARENT ACTION
// AUTO GENERATED – Do not modify or remove comment markers above or below:if ( !function_exists( ‘chld_thm_cfg_parent_css’ ) ):
function chld_thm_cfg_parent_css() {
wp_enqueue_style( ‘chld_thm_cfg_parent’, trailingslashit( get_template_directory_uri() ) . ‘style.css’, array( ‘meanmenu’,’business-hub-grid’,’owl-carousel’ ) );
}
endif;
add_action( ‘wp_enqueue_scripts’, ‘chld_thm_cfg_parent_css’, 10 );// END ENQUEUE PARENT ACTION
function business_hub_main_slider(){$theme_options = business_hub_theme_options();
$readmore = $theme_options[‘read_more_enable’];
$read_more = $theme_options[‘readmore_text’];
$slider_excerpt = $theme_options[‘slider_excerpt_enable’];
$slider_number = $theme_options[‘slider_number’];
if( ‘slider’ === $theme_options[‘main_slider_type’] && ( 1 === $theme_options[‘slider_enable’]) ){
if(!empty( $theme_options[‘slider_cat’] )){
$slider_args = array(
‘cat’ => absint( $theme_options[‘slider_cat’] ),
‘post_status’ => ‘publish’,
‘posts_per_page’ => absint( $slider_number),
);
} else{$slider_args = array( ‘post_status’ => ‘publish’, ‘posts_per_page’ => 5 );
}$slider_query = new WP_Query( $slider_args );
if ( $slider_query->have_posts() ) : ?>
<div id=”main-slider”>
<div class=”owl-carousel”>
<?php
while ( $slider_query->have_posts() ) : $slider_query->the_post();$image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘full’ ); ?>
<div class=”item slider-linked” data-target=”<?php the_permalink(); ?>” style=”background-image: url(<?php echo esc_url($image_url[0]); ?>); “>
<div class=”caption”>
<h2><?php the_title(); ?></h2>
<?php if( 1 == $slider_excerpt ){ ?>
<div class=”entry-content”>
<p><?php echo esc_html( business_hub_limit_words( get_the_excerpt(), 25 ) ); ?> </p>
</div>
<?php } ?><?php if( 1 == $readmore ){ ?>
<div class=”btn btn-business”>“><?php echo esc_html( $read_more ); ?> <i class=”fa fa-angle-right”></i></div>
<?php } ?>
</div><!– .caption –>
</div><?php endwhile; ?>
</div>
<div class=”scroll-down-wrapper”>
<div class=”scroll-down”>
“>
<div class=”scroll-down-middle”> </div>
<span class=”fa fa-angle-double-down”></span>
</div><!– .scroll-down –>
</div><!– .scroll-down-wrapper –>
</div>
<?php wp_reset_postdata();
endif; ?><?php } elseif( ( 1 === $theme_options[‘slider_enable’]) ){ ?>
<div id=”main-slider” class=”main-banner”>
<?php
$banner_img = $theme_options[‘banner_image’];
if( !empty( $banner_img )){
$banner_img_args = array(
‘p’ => absint( $banner_img ),
‘post_status’ => ‘publish’
);$banner_img_query = new WP_Query( $banner_img_args );
if ( $banner_img_query->have_posts() ) :
while ( $banner_img_query->have_posts() ) : $banner_img_query->the_post();
$banner_img_url = wp_get_attachment_image_src( get_post_thumbnail_id(), ‘full’ ); ?><div class=”item” style=”background-image: url(<?php echo esc_url($banner_img_url[0]); ?>); “>
<div class=”caption”>
<h2><?php the_title(); ?></h2>
<?php if( 1 == $slider_excerpt ){ ?>
<div class=”entry-content”>
<p><?php echo esc_html( business_hub_limit_words( get_the_excerpt(), 25 ) ); ?> </p>
</div>
<?php } ?><?php if( 1 == $readmore ){ ?>
<div class=”btn btn-business”>“><?php echo esc_html( $read_more ); ?> <i class=”fa fa-angle-right”></i></div>
<?php } ?>
</div><!– .caption –>
<div class=”scroll-down-wrapper”>
<div class=”scroll-down”>
“>
<div class=”scroll-down-middle”> </div>
<span class=”fa fa-angle-double-down”></span>
</div><!– .scroll-down –>
</div><!– .scroll-down-wrapper –>
</div><!– .item –><?php
endwhile;
wp_reset_postdata();
endif;
}
?>
</div><!– .main-slider –><?php }
}add_action(‘wp_head’, ‘business_hub_child_custom_script’ );
/**
* [business_hub_child_custom_script Add custom script for slider image click]
* @return [NULL] [description]
*/
function business_hub_child_custom_script(){
?>
<script type=”text/javascript”>jQuery(document).ready(function($){
$(‘.slider-linked’).click(function(){
var link = $(this).attr(‘data-target’);
window.location.href = link;
});
});
</script>
<?php
}Thank you in advance.
evahillParticipantPlease disregard that last reply. I figured it out.
Again, thank you for your help!!!evahillParticipantThank you. That worked, but then I deleted the “front page” page thinking it was unnecessary and now the home page is separate pictures with properties, rather than a slide show.
So I added another “front page” page, and it still isn’t working.Ugh!
Please help!
-
AuthorPosts