地狱,我想给p标签一个特定的类名称,但我找不到如何做。我想给a P标签一个课程,因为我想用CSS对其进行样式。
<?php
/* this plugin makes advanced custom fields*/
/**
* Voeg de parent thema's stijl toe.
*/
ob_start();
function ultra_child_enqueue_parent_style() {
wp_enqueue_style( 'ultra-parent-style', get_template_directory_uri() . '/style.css' );
}
add_action( 'wp_enqueue_scripts', 'ultra_child_enqueue_parent_style', 8 );
function ultra_child_enqueue_scripts() {
//Plaats hier de javascript bestanden.
}
add_action( 'wp_enqueue_scripts', 'ultra_child_enqueue_scripts', 8 );
/**
* Plaats hier overige code in functions
*/
/* here I already make some p tags, but it generates an extra p tag and I
want to give that p tag an class to style it in the css
*/
/*这里我已经制作了一些P标签,但是它会生成额外的P标签,我 想要给该P标签一个课程,以在CSS中进行样式 //在这里我已经制作了一些p标签,但是它会产生额外的p标签,我 想要给该P标签一个课程,以在CSS中进行样式 //在这里我已经制作了一些p标签,但是它会产生额外的p标签,我 想要给该P标签一个课程,以在CSS中进行样式 //在这里我已经制作了一些p标签,但是它会产生额外的p标签,我 想要给该P标签一个类,以在CSS
中样式// ACF custom field excerpt
function review_excerpt() {
global $post;
$text = get_field('review'); //Replace 'your_field_name'
if ( '' != $text ) {
$text = strip_shortcodes( $text );
$text = apply_filters('the_content', $text);
$text = str_replace(']]>', ']]>', $text);
$permalink = get_permalink($post->ID);
$excerpt_length = 60; // 20 words
$excerpt_more = apply_filters('excerpt_more', ' ' . '<a href="'.$permalink.'" rel="nofollow"><br>Lees Meer</a>');
$text = wp_trim_words( $text, $excerpt_length, $excerpt_more );
}
return apply_filters('the_excerpt', $text);
}
// foto vergelijking ophalen en als object weergeven.
function get_foto($image){
if( !empty($image) ) {
echo $image['url'];
}
}
/* Registreer Recensies
----------------------------------------------------------------------*/
$labels = array(
'name' => 'Recensies',
'singular_name' => 'Recensie',
'add_new' => 'Recensie toevoegen',
'add_new_item' => 'Quote',
'edit_item' => 'Wijzig recensie',
'new_item' => 'Nieuwe recensie',
'view_item' => 'Bekijk recensie',
'search_items' => 'Zoek recensie',
'not_found' => 'Geen recensie gevonden',
'not_found_in_trash' => 'Geen recensie in de prullenbak gevonden',
'parent_item_colon' => '',
'menu_name' => 'Recensies'
);
register_post_type('recensies',array(
'public'=>true,
'show_in_menu'=>true,
'show_ui'=>true,
'labels'=>$labels,
'hierarchical' => false,
'supports'=>array('title'),
'capability_type' => 'post',
/* developer.wordpress.org/resource/dashicons */
'menu_icon' => 'dashicons-editor-quote',
'taxonomies'=>array(),
'exclude_from_search'=>false,
'rewrite'=>true,
'rewrite'=>array( 'slug' => 'recensies', 'with_front' => true ),
'menu_position' => 4
)
);
/* Registers picture before and after they have been posted.
----------------------------------------------------------------------*/
$labels = array(
'name' => 'Foto vergelijking',
'singular_name' => 'Foto vergelijking',
'add_new' => 'Foto Voor en Na toevoegen',
'add_new_item' => 'Foto Voor en Na',
'edit_item' => 'Wijzig foto vergelijking',
'new_item' => 'Nieuwe foto vergelijking',
'view_item' => 'Bekijk foto vergelijking',
'search_items' => 'Zoek foto vergelijking',
'not_found' => 'Geen foto vergelijking gevonden',
'not_found_in_trash' => 'Geen foto vergelijking in de prullenbak gevonden',
'parent_item_colon' => '',
'menu_name' => 'Foto Voor en Na'
);
register_post_type('fotovergelijking',array(
'public'=>true,
'show_in_menu'=>true,
'show_ui'=>true,
'labels'=>$labels,
'hierarchical' => false,
'supports'=>array('title'),
'capability_type' => 'post',
/* developer.wordpress.org/resource/dashicons */
'menu_icon' => 'dashicons-format-gallery',
'taxonomies'=>array(),
'exclude_from_search'=>false,
'rewrite'=>true,
'rewrite'=>array( 'slug' => 'voorenna', 'with_front' => true ),
'menu_position' => 4
)
);
?>
您是否尝试将类添加到主题中的HTML?