Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #1242321

    This website is for a podcast so there is a title of the show and a subtitle, which contains the name(s) of the people being interviewed in the podcast. Like this:

    Teach for All in Context
    Matthew A.M. Thomas, Emilee Rauschenberger, and Katy Crawford-Garrett

    If I create a custom field using acf plugin, how would I place the call for the custom field into the templates for masonry and magazine, like so?:
    —-
    Magazine:

    Thumbnail Date
    Title
    Subtitle
    —-

    Masonry (with default captions):

    IMAGE
    Title Subtitle
    Date

    #1243852

    Hey stupaul22,

    Thank you for the inquiry.

    The shortcode files or templates are located in the enfold/config-templatebuilder/aviashortcodes directory and in order to include anything in the Masonry element, we have to modify the av-helper-masonry.php file. The markup for the title and excerpt starts from line 485. You can include the additional content from the plugin around that block.

    $items .=	"<{$heading} class='av-masonry-entry-title entry-title {$css}' {$markup}>{$the_title}</{$heading}>";
    

    Best regards,
    Ismael

    #1245801

    Thank you Ishmael,

    I set the key on line 622:
    $this->loop[ $key ][‘the_subtitle’] = get_field(‘subtitle’, $id );

    I called the key on line 471:
    $items .= “<div class=’post-author’>{$the_subtitle}</div>”;

    #1245802

    Ishmael,

    We are half finished.
    Please send me off in the right direction to do the same for magazine like this:
    http://freshed.wpengine.com/wp-content/uploads/2020/09/sub.jpg (hosted on WPengine)

    Which file do I edit?
    What line?
    What’s the code to display get_field(‘subtitle’, $id ) ?

    #1246317

    Hi,

    Thank you for the update.

    The magazine template is located in the magazine > magazine.php file inside the same directory. The title of the magazine item is rendered around line 1264:

    $output .=			"<{$titleTag} class='av-magazine-title entry-title {$titleCss}' {$markupTitle}>{$title}</{$titleTag}>";
    

    Best regards,
    Ismael

    #1246599

    set variable on line 1058:
    $sub_title = get_field(‘subtitle’, $entry );

    output on line 1209:

    $output .= “<div class=’post-author’>{$sub_title}</div>”;

    #1246786

    Hi,

    Thank you for the info. We’ll close this thread now. Please don’t hesitate to open another if you need anything else.

    Have a nice day.

    Best regards,
    Ismael

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Add subtitle to magazine and masonry’ is closed to new replies.