I would like to add a ACF php code on Generatepress Elements.
This is the codeȘ
<?php if ( have_rows( ‘pareri’ ) ) : ?>
<?php while ( have_rows( ‘pareri’ ) ) : the_row(); ?>
<?php the_sub_field( ‘oaspete’ ); ?>
<?php the_sub_field( ‘data_evaluarii’ ); ?>
<?php the_sub_field( ‘titlu’ ); ?>
<?php the_sub_field( ‘apreciere’ ); ?>
<?php endwhile; ?>
<?php else : ?>
<?php // no rows found ?>
<?php endif; ?>
What should I choose from Elements Type? Header or Hook?
Now, I would like to assign classes / ID’s to the advanced custom fields (https://www.screencast.com/t/L1ylNJMqCw).
Should I enqueue a new stylesheet to load them or could I use the Simple CSS plugin and insert there the new classes and ID’s I want to use?
If your CSS is going to be minimal i would just add it to your other CSS in Simple CSS.
If it is going to be a 400+ lines and only required on selective pages then i would look at enqueuing a style sheet