Featured Icon Blocks not using excerpt?

Forums ยป WordPress ยป Fluida ยป Bugs

  • Author
    Posts
  • #42201

    Setting the text content to “excerpt” seems to ignore what is in the excerpt field on the page, and instead takes from text from the body of the page. This would be fine, if it honoured the <!– more –> tag because you could then cut off text you didn’t want to appear?

    What I’m expecting if you’ve selected “Blocked Content” to be excerpt

    1) Text to be taken fro the excerpt field on the page.
    OR
    2) If there is no excerpt text, take it from the page content, but use <!–more–> (or something similar) to know where to cut off
    3) If there is no <!–more–> tag, cut off after x characters (which could be a setting)

    Am I being daft and missing something?

    • This topic was modified 7 years ago by delanthear. Reason: typo
    • This topic was modified 7 years ago by delanthear.
    #42252

    I’ve fixed this with a child theme. It looks like that to have post excepts being used properly, a tweak can be made to fluida_custom_excerpt in fluida/includes/core. It doesn’t look at that field at all. It could be tweaked to look for a post excerpt before creating one from the post.

    I’ve done it in a hacky way, but might spend some time adding this to the right function.

    #42313

    Here is the function to override in a child theme if you need it:

    function fluida_lpblocks() {
    	$maintitle = cryout_get_option('fluida_lpblockmaintitle');
    	$maindesc = cryout_get_option('fluida_lpblockmaindesc');
    	$pageids = cryout_get_option( array( 'fluida_lpblockone', 'fluida_lpblocktwo', 'fluida_lpblockthree', 'fluida_lpblockfour') );
    	$icon = cryout_get_option( array( 'fluida_lpblockoneicon', 'fluida_lpblocktwoicon', 'fluida_lpblockthreeicon', 'fluida_lpblockfouricon' ) );
    	$blockscontent = cryout_get_option( 'fluida_lpblockscontent' );
    	$blocksclick = cryout_get_option( 'fluida_lpblocksclick' );
    	$count = 1;
    	$pagecount = count (array_filter( $pageids ) );
    	if ( empty( $pagecount ) ) return;
    	?>
    	<section class="lp-blocks lp-blocks-rows-<?php echo absint( $pagecount ); ?>">
    		<?php if(  ! empty( $maintitle ) || ! empty( $maindesc ) ) { ?>
    			<div class="lp-section-header">
    				<?php if( ! empty( $maintitle ) ) { ?><h2 class="lp-section-title"> <?php echo do_shortcode( wp_kses_post( $maintitle ) ); ?></h2><?php } ?>
    				<?php if( ! empty( $maindesc ) ) { ?><div class="lp-section-desc"> <?php echo do_shortcode( wp_kses_post( $maindesc ) ); ?></div><?php } ?>
    			</div>
    		<?php } ?>
    		<div class="lp-blocks-inside">
    			<?php foreach ( $pageids as $key => $pageid ) {
    				if ( !empty( $pageid ) ) {
    					$page = get_post( $pageid );
    
    					switch ( $blockscontent ) {
    						case '2': $text = ''; break;
    						case '1': $text = $page->post_content; break; 
    						case '0': default: 
    							if ( ! empty( $page->post_excerpt ) ) {
    								$text = fluida_custom_excerpt( $page->post_excerpt ); 
    							} else {
    								$text = fluida_custom_excerpt( $page->post_content ); 
    							}
    							break;
    					};
    
    					$data[$count] = array(
    						'title' => $page->post_title,
    						'text'	=> $text,
    						'icon'	=> ( ( $icon[$key . 'icon'] != 'no-icon' ) ? $icon[$key . 'icon'] : '' ),
    						'link'	=> get_permalink( $pageid ),
    						'click'	=> $blocksclick,
    						'id' 	=> $count,
    					);
    					fluida_lpblock_output( $data[$count] );
    					$count++;
    				}
    			} ?>
    		</div>
    	</section>
    <?php } //fluida_lpblocks()
    #42487
    Zed
    Cryout Creations mastermind

    Thanks for pointing this out. We’ll try to include support for the custom excerpt in the next update.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #42519

    Great ๐Ÿ™‚

    #43532

    I’ve encountered the same problem with the Nirvana theme. Could you please include support for custom excerpt in Nirvana as well?
    Thanks!

    #43535

    Just upgraded to Fluida 1.3.0 The new theme doesn’t pull anything for except at all now even though it’s populated on the pages.

    #43653
    Zed
    Cryout Creations mastermind

    Pages don’t normally have excerpts in WordPress. How are you defining these excerpts?


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #43666

    Weird. It’s just there: Image from page details showing excerpt box

    Website: www.rockrunrelax.co.uk

    #43667

    Ah! It’s hidden by default on pages. You turn it on from the screen options:

    Enabling Screenoptions

    #43685
    Zed
    Cryout Creations mastermind

    There is no excerpt for pages under the Screen Options by default, so you must be using a plugin (or custom code) to activate it.

    However, we figured out what was missing and support for the non-existent ๐Ÿ™‚ page excerpts will work in the next update.


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #43695

    Something very odd going on. I’ve don’t have a plugin for it, and I’m using your theme and the override for displaying it needs to be placed in the functions.php file.

    My other blog, using default twenty fifteen theme, and no plugins (as I don’t use excepts at all on that blog) doesn’t display excepts, but it’s there in the screen options drop down to enable!

    #43811
    Zed
    Cryout Creations mastermind

    The override can be part of any file that gets loaded by WordPress, not necessarily the theme’s functions.php.

    Maybe you’re running a customized WordPress version?


    If you like our creations, help us share by rating them on WordPress.org.
    Please check the available documentation and search the forums before starting a topic.
    #43931

    Very very weird. Just created a new install, added all the same themes and plugins and the option isn’t there. I’ve no idea how I made it appear!

    Never mind. Thanks for adding the ability ๐Ÿ˜€

Viewing 14 posts - 1 through 14 (of 14 total)

The topic ‘Featured Icon Blocks not using excerpt?’ is closed to new replies.