- This topic has 14 replies, 2 voices, and was last updated 8 years, 4 months ago by Fabio.
-
AuthorPosts
-
August 18, 2016 at 2:57 pm #97530FabioParticipant
I have 2 issues:
My Feature Post Slider is displaying html in the excerpt. For example, for post 1:
After the number of words allowed in the excerpt it states <span class=”readmore”>Read More…</span>
If I reset excerpt length to 0 it still reads the html line (without any excerpt words from actual post).
Also, my images do not align properly, in either True or Wait formats. Do I have to crop them all to same size?
August 18, 2016 at 3:12 pm #97534FabioParticipantOk, I figured out the issue with the images. They need to be the same width.
However, I am still getting html on my excerpt. The html is basically the link info for the “Read More…” tag/button. Can’t figure out why it is showing, however.
August 18, 2016 at 3:34 pm #97537MaheshParticipantlatinoliteratures:
Hi Fabio,Thank you for using Fabulous Fluid Pro theme.
1. For excerpt issue, please refer to this thread:
https://catchthemes.com/support-forum/topic/html-tag-in-slider-excerpt-text/#post-97517
2. Image align issue:
The recommended size for slider iamage is Width: 1680px Height: 720px, please use the image with same size as far as possible. Exact size is not necessary as long as the image has same aspect ratio, you are good to go.Let me know if any problem.
Regards,
MaheshAugust 19, 2016 at 12:01 am #97567FabioParticipantHi Mahesh,
Thanks for your response.
I went to the thread you recommended to fix the Feature Post Slider issue, but I failed to see a sample child theme for the Fabulous Fluid Pro Theme (which is the one I am using). Would a different file work? Please advice.
August 19, 2016 at 10:02 pm #97633MaheshParticipant@latinoliteratures: Yes, you can use any different file too. Just make sure you’ve followed along the instructions on creating child theme as of HERE.
Regards,
MaheshAugust 20, 2016 at 12:12 am #97645FabioParticipantI tried everything and it didn’t work. Then I downloaded the one-click child theme plugin and it reset all of my modifications.
This is a pain in the ass.
I thought it was going to be simple by buying a theme.
I am frustrated.
August 20, 2016 at 3:03 am #97653FabioParticipantI WENT AHEAD AND USED THE PLUGIN YOU RECOMMENDED FOR BUILDING CHILD THEMES. I MADE ONE FOR FABULOUS FLUID PRO.
//THE FOLLOWING IS MY STYLE.CSS FILE//
/*
Theme Name: FabulousFluid-Pro-Child
Description:
Author: admin
Template: fabulous-fluid-pro(optional values you can add: Theme URI, Author URI, Version, License, License URI, Tags, Text Domain)
*///THE FOLLOWING IS MY FUNCTIONS.PHP FILE AFTER I INPUT YOUR CODE//
<?php
//
// Recommended way to include parent theme styles.
// (Please see http://codex.wordpress.org/Child_Themes#How_to_Create_a_Child_Theme)
//
add_action( ‘wp_enqueue_scripts’, ‘theme_enqueue_styles’ );
function theme_enqueue_styles() {
wp_enqueue_style( ‘parent-style’, get_template_directory_uri() . ‘/style.css’ );
wp_enqueue_style( ‘child-style’,
get_stylesheet_directory_uri() . ‘/style.css’,
array(‘parent-style’)
);
}
//
// Your code goes below
//
function fabulous_fluid_page_slider() {
$quantity = apply_filters( ‘fabulous_fluid_get_option’, ‘featured_slide_number’ );$excerpt_more_text = apply_filters( ‘fabulous_fluid_get_option’, ‘excerpt_more_text’ );
global $post;
$output = ”;
$number_of_page = 0; // for number of pages
$page_list = array(); // list of valid page ids//Get number of valid pages
for( $i = 1; $i <= $quantity; $i++ ){
if( apply_filters( ‘fabulous_fluid_get_option’, ‘featured_slider_page_’ . $i ) && apply_filters( ‘fabulous_fluid_get_option’, ‘featured_slider_page_’ . $i ) > 0 ){
$number_of_page++;$page_list = array_merge( $page_list, array( apply_filters( ‘fabulous_fluid_get_option’, ‘featured_slider_page_’ . $i ) ) );
}}
if ( !empty( $page_list ) && $number_of_page > 0 ) {
$get_featured_posts = new WP_Query( array(
‘posts_per_page’ => $quantity,
‘post_type’ => ‘page’,
‘post__in’ => $page_list,
‘orderby’ => ‘post__in’
));$i=0;
while ( $get_featured_posts->have_posts() ) {
$get_featured_posts->the_post();$i++;
$title_attribute = the_title_attribute( array( ‘echo’ => false ) );
$classes = ‘page page-‘ . $post->ID . ‘ slider-box’;
if ( $i == 1 ) {
$classes .= ‘ first’;
}//Default value if there is no featurd image or first image
$image_url = get_template_directory_uri() . ‘/images/no-featured-image-1680×720.jpg’;
$image = ‘‘;if ( has_post_thumbnail() ) {
$image = get_the_post_thumbnail( $post->ID, ‘fabulous-fluid-slider’, array( ‘title’ => $title_attribute, ‘alt’ => $title_attribute, ‘class’ => ‘wp-post-image’ ) );$image_url = get_the_post_thumbnail_url( $post->ID, ‘fabulous-fluid-slider’ );
}
else {
//Get the first image in page, returns false if there is no image
$first_image = fabulous_fluid_get_first_image( $post->ID, ‘fabulous-fluid-slider’, array( ‘title’ => $title_attribute, ‘alt’ => $title_attribute ) );//Set value of image as first image if there is an image present in the page
if ( ” != $first_image ) {
$image = $first_image;$image_url = fabulous_fluid_get_first_image( $post->ID, ‘fabulous-fluid-slider’, ”, true );
}
}$tag = “a”;
$content = get_the_excerpt();
$content = preg_replace(“/<\\/?” . $tag . “(.|\\s)*?>/”, null,$content);$output .= $image;
$output .= ‘
<div class=”caption”>
<span class=”vcenter”>
‘ . the_title( ‘<span class=”entry-title”>’,'</span>’, false ) . ‘<span class=”entry-content”>’ . wp_kses_post( $content ) . ‘</span>
<span class=”more”>’ . esc_html( $excerpt_more_text ) . ‘</span>
</span><!– .vcenter –>
</div><!– .caption –>
<!– .slider-box –>’;
} //endwhilewp_reset_query();
}
return $output;
}// I ALSO ADDED THE EXTRA CSS TO THE CUSTOM CSS BOX UNDER THEME OPTIONS //
#feature-slider .entry-content span.readmore {
display: none;
}//AND THE HTML KEEPS APPEARING IN THE FEATURE POST SLIDER.//
August 20, 2016 at 5:19 am #97656FabioParticipantAlso, I would like to know if there is a way to disable the excerpt on the Feature Post Slider but keep it in the Feature Content (and Feature Grid Content) option?
August 20, 2016 at 6:53 am #97657FabioParticipantI REALLY NEED HELP NOW… I tried editing the functions.php file on the Original Fabulous Fluid Pro theme file and it disappeared. Now I can’t even access Editor tools in WordPress. Terrible day.
August 20, 2016 at 7:01 am #97658FabioParticipantI can’t even access my WordPress Bench now… even worse.
August 20, 2016 at 7:14 am #97660FabioParticipantOk, I got it back by ftp-ing the theme directly into the wp-content folders in my server… wont mess with those .php files again…
August 22, 2016 at 9:39 am #97765MaheshParticipant@latinoliteratures:
Hi Fabio:Sorry for the late reply. Working with child theme or working with code is kinda tricky. A small character can break the whole site and make it inaccessible. I highly recommend you to do the modifications only if you are familiar with programming or else hire a customizer.
Is the theme working now? You do have option to show content in Featured Content but not in the Featured Slider. You can use Custom CSS for hiding the excerpt in the Featured Slider.Let me know further.
Regards,
MaheshAugust 22, 2016 at 10:48 am #97773FabioParticipantWhat is the custom CSS code to hide the excerpt in Feature Slider?
Like I mentioned before, I added the code you said that should work, but it didn’t. The html is still showing in the excerpt for Feature Post Slider. It seems to me like this should be an issue that you guys should fix, since it is your theme that is not working correctly.
August 22, 2016 at 12:25 pm #97781MaheshParticipant@latinoliteratures: Yes, it is an issue and will be fixed in the next update.
For hiding excerpt in Feature Slider go to Dashboard=> Appearance=> Customize=> Theme Options=> Custom CSS box and add the following CSS:#feature-slider .caption .entry-content, #feature-slider .caption .more { display: none; }
Hope this helps.
Regards,
MaheshAugust 22, 2016 at 12:46 pm #97784FabioParticipantThank you, Mahesh, that worked.
I am looking forward to the updated theme.
Best,
Fabio
-
AuthorPosts
- The topic ‘Feature Slider Excerpt and Images’ is closed to new replies.