Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1019218

    Hi
    we need to rebuild an existing website with Enfold.
    It has more than 3.000 posts – and the post image is not a featured image – it comes from a thumbshot-service.
    The task is:
    Whereever a featured image usualy is used – take a thumbshot
    The thumbshots are generated by the wordpress service and the URL that is needed to generate it, comes from a custom field that already exists.
    Usually i would edit the “loop.php” but since we need to use the thumbshots also for category, search and pages containing a blog-layout grid it would be better to do the replacement on a deeper place of the theme.

    Question: What would be the best place to replace the featured image?

    kind regards Arthur

    #1019779

    Hey Hooge-AGS,

    Thank you for using Enfold.

    If you’re using the grid layout, you need to modify the config-templatebuilder > aviashortcodes > postslider > postslider.php file. Look for the image markup and replace it with the custom field.

    Best regards,
    Ismael

    #1020309

    Hi Ismael
    how to do that with a Child-Theme?
    Do i need to establish the whole structure in my child-themes folder:
    childtheme/config-templatebuilder/aviashortcodes/postslider/postslider.php ?

    Or do i have to put “postslider.php” directly in “childtheme/”

    Arthur

    #1020529

    Hi
    i found around line 311 this:

    $params['innerHtml'] = "<img src='".$this->config['icon']."' title='".$this->config['name']."' />";
    			$params['innerHtml'].= "<div class='avia-element-label'>".$this->config['name']."</div>";
    			$params['content'] 	 = NULL; //remove to allow content elements
    			return $params;

    Whatever i do here has NO influence at all.
    Neither on the post, nor category or any other place.

    Maybe i didnt explain correct what the task is:
    WHEREEVER a featured image usualy is used – take a thumbshot instead
    Whereever means: Everywhere! (Category, grid, post, search,….)

    There must be a constant somewhere which probably could be replaced by the metafield-data.
    Or am i wrong?
    Arthur

    #1020572

    Hi,

    What is the current blog layout of the site? Please provide the link to the actual blog page. You may need to modify the includes > loop-single.php file.
    You can add this filter in the child theme’s function.php file if you want to override the shortcode in your child theme.

    // https://kriesi.at/documentation/enfold/intro-to-advanced-layout-builder/#add-elements-to-alb

    Create a folder called “shortcodes” inside the child theme directory and then create a copy of the shortcodes files inside.

    Best regards,
    Ismael

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