Forum Replies Created

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • in reply to: How to add Shortcodes in Portfolio excerpt #890397

    Hey Ismael,

    thanx for sharing your solution… unfortunatelly id didn’t work out for me… I found an solution now wich I guess is the neatest ways of all.
    Since someone else is having that problem i will share it here:

    1) Make the ALB editable in Child Theme with this Code from your Documentation: https://kriesi.at/documentation/enfold/add-new-or-replace-advanced-layout-builder-elements-from-child-theme/

    2) Copy the portfolio.php from enfold>config-templatebuilder>avia-shortcodes into it

    3) Jump to line 589 where the excerpt starts:

    if(!empty($excerpt))
                        {
                            $markup = avia_markup_helper(array('context' => 'entry_content','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup));
    
                            $output .= "<div class='entry-content-wrapper'>";
                            $output .= "<div class='grid-entry-excerpt entry-content' $markup>".$excerpt."</div>";
                            $output .= "</div>";
                        }
                        $output .= '<div class="avia-arrow"></div>';
                        $output .= "</div>";
    
                        $image = get_the_post_thumbnail( $the_id, $image_size, $image_attrs );

    4) Get the ACF Information
    $varbiable1 = get_field('ACF_VALUE_NAME', $the_id);

    • You can name $varbiable1 what ever you want to make it more easy for you.
    • ACF_VALUE_NAME should be the name of the ACF information you are regarding to
    • $the_id is an enfold function and calls the portfolio ID, so that the information from the right portfolio entry is beeing called
    • If you want to, you can repeat that line with another variable and value

    5) Now to show the information in the excerpt you just add something like this:
    $output .= " . $varbiable1 . ";

    or when you want to make it as an list use:

    $output .= "<ul><li class='CLASS_NAME'>" . $varbiable1 . "</li>";
    $output .= "<li class='CLASS_NAME'>" . $varbiable2 . "</li>";
    $output .= "</ul>

    When you have different text posibillities like singular or plural spelling regarding to the value you can add:

    if($varbiable1 == 1)
    {
    $output .= "<ul><li class='CLASS_NAME'>" . $varbiable1 . " dog</li>";
    }
    else
    {
    $output .= "<ul><li class='CLASS_NAME'>" . $varbiable1 . " dogs</li>";
    }

    And the output is either “1 dog” or “2 dogs” regarding the ACF value.

    6) This gives us the “new” modified code:

    if(!empty($excerpt))
    {
        $markup = avia_markup_helper(array('context' => 'entry_content','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup));
    
        $variable1 = get_field('meeting_raume', $the_id);
        $variable2 = get_field('flache_bis', $the_id);
        
    
        $output .= "<div class='entry-content-wrapper'>";
        $output .= "<div class='grid-entry-excerpt entry-content' $markup>";
    
        if($variable1 == 1){
        $output .= "<ul><li class='CLASS_NAME'>".$variable1." dog/li>";
        }
        else{
        $output .= "<ul><li class='CLASS_NAME'>".$variable1." dogs</li>";
        }
        $output .= "<li class='CLASS_NAME'>" . $variable2 . "</li>";
        $output .= "</ul></div>";
        $output .= "</div>";
    }
    $output .= "</div>";
    
    $image = get_the_post_thumbnail( $the_id, $image_size, $image_attrs );
    • This reply was modified 7 years ago by Andreas.
    in reply to: How to add Shortcodes in Portfolio excerpt #888803

    Hey Ismael,
    yes i have removed the copy before.

    Please see portfolio.php code here: https://pastebin.com/iB9EqaUz

    Best Regards,
    Andy

    in reply to: How to add Shortcodes in Portfolio excerpt #888353

    Hey Ismael,

    changed it in parent theme – but still no output….

    in reply to: How to add Shortcodes in Portfolio excerpt #887838

    Hey Ismael,

    thnx again for the fix but still… not showing the acf shortcode in the excerpts wich are shown in the “full portfolio”

    in reply to: How to add Shortcodes in Portfolio excerpt #887172
    This reply has been marked as private.
    in reply to: How to add Shortcodes in Portfolio excerpt #886002

    Hey Ismael,

    thank you for the fix – it seems to work but surpresses the output right now…

    do I have to change the code anywhere else too?

    in reply to: How to add Shortcodes in Portfolio excerpt #885458

    Hey Ismael,

    thnx for hitting back to me – please see information below

    Regards,
    Andy

    in reply to: Change loaded imaged size on blog #829484
    This reply has been marked as private.
    in reply to: Change loaded imaged size on blog #829466

    Hey John,
    unfortunatelly this is not the answer to my problem…
    I need to change the images size wich is laoding on big preview vom 1000*430 to the portfolio size 495*400 (all those are already generated…)
    and I can not just change the 1000*430 via this plugin since I need the 1000*430 on other places…

    to be even more accuracte I need this:
    $avia_config[‘imgSize’][‘portfolio’] = array(‘width’=>495, ‘height’=>400 );// images for portfolio entries (2,3 column)
    Image size as the new Blog big preview size…

    Cheers,
    Andy

    in reply to: Google Maps API error #749512

    Hey Mike,
    worked like a charme with: https://de.wordpress.org/plugins/api-key-for-google-maps/ the plugin…

    can be closed now…

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