-
AuthorPosts
-
September 1, 2020 at 12:34 am #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-GarrettIf 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
DateSeptember 7, 2020 at 5:50 am #1243852Hey 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,
IsmaelSeptember 14, 2020 at 6:28 pm #1245801Thank 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>”;September 14, 2020 at 6:37 pm #1245802Ishmael,
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 ) ?September 16, 2020 at 1:00 pm #1246317Hi,
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,
IsmaelSeptember 17, 2020 at 8:59 pm #1246599set variable on line 1058:
$sub_title = get_field(‘subtitle’, $entry );output on line 1209:
$output .= “<div class=’post-author’>{$sub_title}</div>”;
September 18, 2020 at 12:38 pm #1246786 -
AuthorPosts
- The topic ‘Add subtitle to magazine and masonry’ is closed to new replies.