Printing first line of content in wordpress

What you can do is work with this the_excerpt() change this instead of the_content(); And give the amount of words that you want, add this in functions.php after you add the_excerpt(); function custom_excerpt_length( $length ) { return 20; } add_filter( ‘excerpt_length’, ‘custom_excerpt_length’, 999 ); Read more in here: https://developer.wordpress.org/reference/functions/the_excerpt/

How can I change page content for good once a button is pressed?

Do I understand problem correctly? [QR1] -> Scan -> [Claim listing] -> [QR1->QR2 claimed] -> [QR2] Here what comes to mind class RenderPage function gen_qr(is_claimed) if (is_claimed) return generate_qr2; else return generate_qr1 function display_page() $qr_code = gen_qr(get_option(‘<page_id>_qr’)); // on button click update_option(‘<page_id>_qr’) It’s a bit schematic, but I think you got the idea. P.S. Just … Read more