Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #1400123

    Is it possible to add a subheading to the title that appears in the magazine that I have appearing in the sidebar of this page (and pages like it)

    This site is for counselors and the subheading lists their credentials.

    #1400165

    Hey satucker,
    Thank you for your patience, to add the manual excerpt field content to the small magazine element you will need to edit the file magazine.php so to not lose your modifications after the next update I recommend installing a Child Theme, this is the most current one in the child theme functions.php you will note this snippet:

    function avia_include_shortcode_template( $paths )
    {
    	if( ! is_array( $paths ) )
    	{
    		$paths = array();
    	}
    	
    	$template_url = get_stylesheet_directory();
    	array_unshift( $paths, $template_url . '/shortcodes/' );
    
    	return $paths;
    }
    
    add_filter( 'avia_load_shortcodes', 'avia_include_shortcode_template', 15, 1 );

    if you don’t use the most current one ensure this is in the functions.php
    Then via FTP add the directory /shortcodes/ to your child theme and in that copy the directory /enfold/config-templatebuilder/avia-shortcodes/magazine/
    Now in your new /enfold-child/shortcodes/magazine/ directory edit the file magazine.php look for this starting at line 1494 (v5.4.1)

    if( $style == 'small' )
    			{
    				if( empty( $this->config['thumbnails'] ) )
    				{
    					 $image = '';
    					 $extraClass = 'av-magazine-no-thumb';
    				}

    and add this line:
    $excerpt = ! empty( $entry->post_excerpt ) ? $entry->post_excerpt : avia_backend_truncate( $entry->post_content, apply_filters( 'avf_magazine_excerpt_length', 10 ), apply_filters( 'avf_magazine_excerpt_delimiter', ' ' ), '…', true, '' );
    Enfold_Support_536.jpeg
    Now you can enable the manual excerpt field in your post or portfolio item in the Screen Options tab:
    Enfold_Support_538.jpeg
    add your content:
    Enfold_Support_540.jpeg
    and it will show on the frontend:
    Enfold_Support_542.jpeg
    This example was created with portfolio items that were created with the Advanced Layout Builder and the date in the magazine element was hidden with this css:

    #top time.av-magazine-time.updated {
        display: none;
    }

    If posts were used in the magazine element that were created with the WordPress default editor then the default excerpts would be shown and you would not need to use the manual excerpt field:
    Enfold_Support_544.jpeg

    Best regards,
    Mike

    #1400443

    just a little off topic Mike – for what is the if clause in the snippet? The docu and the snippet i use always is without that if clause:
    Docu-Link

    #1400464

    Hi,
    Guenni007 in the child theme since about v5 the Dev Team has referred to it in the PHPDoc headers of the functions.php file:

     * @param array $paths
     * @return array

    I’m referring to the child theme in the full enfold with docs zip, I linked to it above, you don’t need to add it to your child theme and it’s not necessary, I refer to it above to keep the answer consistent with the files that I linked to.

    Best regards,
    Mike

    #1400646

    thanks

    #1400678

    Hi,
    Thank you Guenni007 @satucker did this solution help?

    Best regards,
    Mike

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.