i created a lot of portfolio posts which now should get an colorsection on top:
add_action('ava_after_main_title', function() {
if ( is_singular( 'portfolio' ) ) {
?>
<div data-section-bg-repeat="stretch" style="background-repeat: no-repeat;
background-image: url(absoluteURL.jpg);
background-attachment: scroll; background-position: top center; " class="avia-section main_color avia-section-default avia-no-shadow avia-full-stretch avia-bg-style-scroll avia-builder-el-0 el_before_av_one_full avia-builder-el-first beitragsheader av-minimum-height av-minimum-height-25 container_wrap fullsize" id="av_section_1">
<div class="container">
<main class="template-page content av-content-full alpha units" itemprop="mainContentOfPage" role="main">
<div class="post-entry post-entry-type-page">
<div class="entry-content-wrapper clearfix">
</div>
</div>
</main>
</div>
</div>
<?php
}
});
everything works fine!
But now i thought it would be nice if every portfolio entry of a given Portfolio Categorie gets his own heading image!
But i do not find a hint in source code to what category the post concerns. No Tag_ID nor category by name etc. ??
hm – now i know:
#
if ( is_singular( 'portfolio' ) && has_term( 'apotheken', 'portfolio_entries' ) ) { …
my fault was that i thought the Portfolio Categories are “Categories” :lol
can be closed now