theme action hooks and filters?

Posted in: Newspaper
Post count: 11

Hello, we have moved to Newspaper theme from a previous theme that supported action hooks and filters, where we used our functions.php file to modify the page contents. For example, to show custom fields on posts, we used this code in our child theme functions.php:

// add album title, label and article subtitle to posts and pages
function vg_subtitle($posttitle) {
global $post;
$albumtitle = get_post_meta ($post->ID, 'Album Title', true);
$albumlabel = get_post_meta ($post->ID, 'Label', true);
$subtitle = get_post_meta ($post->ID, 'Subtitle', true);
echo $posttitle;
if ($albumtitle) echo '<div id="vg-albumtitle">' . $albumtitle . '</div>';
if ($albumlabel) echo '<div id="vg-albumlabel">' . $albumlabel . '</div>';
if ($subtitle) echo '<div id="vg-subtitle">' . $subtitle . '</div>';
}
add_action('thematic_postheader_posttitle','vg_subtitle');

I am wondering, does Newspaper support action hooks such as this, to display these custom fields? I am wondering where I might find the Newspaper theme equivalent to replace above ‘thematic_postheader_posttitle’ … ? Is there a support doc reference to theme action hooks and filters? Thanks!

Post count: 22421

Hi,
Any wp theme uses hooks and actions. You just need to know how to tie into the code. This requires php knowledge and a code from your previous theme most likely will not work directly on our theme. If you want to add customization to our theme the best thing to do is read the theme API documentation: https://forum.tagdiv.com/the-theme-api/
Thank you!

Viewing 2 posts - 1 through 2 (of 2 total)
The forum ‘Newspaper’ is closed to new topics and replies.