Tagged: 

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

    First of all, thank you for a great theme with an absolutely fantastic visual page builder! :-) I allways end up going back to Enfold when I have tried to build with something else, thinking “why on earth didn’t I just use Enfold in the first place?”

    To the point then; Is it possible to make boxes on a page with excerpt from pages? Not post, but pages?

    Homepage is a page and underneath the slider, I would like 3 boxes with excerpts from subpages (headline, 2-3 lines of the first part og the text and a “read more” -ish).

    Is that possible?

    #756201

    Hey Tanja!

    Thank you for using Enfold.

    Are you using the blog posts element’s grid layout? Please add this filter in the functions.php file to query the page instead of post.

    add_filter('avia_post_slide_query', 'avia_post_slide_query_mod', 10, 2);
    function avia_post_slide_query_mod( $query, $params ) {
    	$query['post_type'] = 'page';
    	$query['tax_query'] = '';
    	return $query;
    }

    Best regards,
    Ismael

    #756428

    Hi Ismael,
    Thank you for your reply! When you say “the blog post element’s grid layout” do you mean this feature? Blog post

    If it is, then yes it could be. Or any ohter frature that could provide a box with an excerpt from a given page.

    What I try to acheive is have the 3 grey boxes belov the slider, contain excerpts form specifik pages. Not just the latest 3 pages, but 3 different pages that i determin.

    Where I would like the page excerpts

    Would that be possible with what you suggest?

    #756758

    Hi!

    The code above should display pages instead of posts if you’re using the blog posts element. If you want to create the layout in the screenshot, try to add columns, add a custom background then use the following shortcode in a text or code block:

    [avs_page_excerpt id="13"]
    

    And in the functions.php file, add this:

    function avs_get_page_excerpt($args) {
    	extract(shortcode_atts(array(
    		'id' => ''
    	), $args));
    
    	$excerpt = get_the_excerpt($args['id']);
    	return $excerpt;
    }
    add_shortcode('avs_page_excerpt', 'avs_get_page_excerpt');

    The shortcode will get the excerpt from the page with the designated id. Unfortunately, there is no element that will automatically create the layout that you’re after so you need to create a custom shortcode and add some css modifications.

    Cheers!
    Ismael

    #757059

    This was exactely what I was hoping for Ismael – thank you! It dosn’t have to be automatic, this is more that adequate, as long as I can get an excerpt from a specific page, like I can with this solution.

    Thank you again! :-)

    #757690

    Hi!

    Great! Let us know if you encounter any issues with the modification.

    Regards,
    Ismael

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