• Resolved srorke00

    (@srorke00)


    For accessibility, the READ MORE on posts needs to be customized – i.e. you cannot have multiple duplicated “READ MORE” links on the same page.
    In twenty twenty, i added the following code to functions:

    `add_filter( ‘pt_cv_dargs_others’, ‘cvp_theme_change_readmore_text_per_post’, 999, 2 );

    function cvp_theme_change_readmore_text_per_post( $dargs, $post_idx ) {
    global $post;
    $meta = get_post_meta( $post->ID );
    if ( !empty( $meta[ ‘cvp_readmore_text’ ][ 0 ] ) ) {
    $dargs[ ‘field-settings’ ][ ‘content’ ][ ‘readmore-text’ ] = $meta[ ‘cvp_readmore_text’ ][ 0 ];
    }
    return $dargs;
    }`

    I added this to twenty twenty one, but cannot find how to turn on Custom fields. It was a Preference in Twenty Twenty.

Viewing 2 replies - 1 through 2 (of 2 total)
  • when editing a post, in the gutenberg editor, click the three dots top right (‘Options’), then you should see a tab ‘Preferences’ at the bottom right (if you don’t see this because your screen is too small, zoom out – until you see it). click that ‘Preferences’ tab, then click ‘Panels’, then below ‘Additional’ enable ‘Custom fields’

    Thread Starter srorke00

    (@srorke00)

    Thank you – i did eventually find it. The Preferences dialog has changed, and there are now left hand navigation tabs which i failed to see. Custom fields is on the Panels tab.

    I’m not sure when it changed, but i believe it is from a newer WordPress version – maybe 5.7…. I was using a new theme – twenty twentyone – which is unrelated.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘custom fields in twenty twenty one’ is closed to new replies.