Site logo

Archived topic

Editing text from old theme

1 reply · Started by Richard on July 10, 2022

Viewing posts 1–2 of 2

Hello, I have switched from the Enfold theme to Generate Press. There I created my text for pages and posts with Avia Layout Architect.
Now I have big problems editing the text with Gutenberg Editor. Everything is displayed in a block with shortcodes and editing is extremely tedious.
Is there a solution to edit my texts easily?

Thanks Richy

Hi there,

i am not sure if there is a better solution, thats directly related to that page builder ( for example somebody made a plugin to strip the shortcodes that Divi generated ). Maybe someone in the Enfold groups may know ?

The more scary option is to search your database for the shortcodes and remove them.

Or you could filter them out of the_content so they don't show on the front end using this PHP Snippet:

function wpdocs_remove_shortcode_from_index( $content ) {
    if ( is_single() || is_page() ) {
        $content = strip_shortcodes( $content );
    }
    return $content;
}
add_filter( 'the_content', 'wpdocs_remove_shortcode_from_index' );

Reference for original snippet: https://developer.wordpress.org/reference/functions/strip_shortcodes/#comment-671

Then you could at least view the front end of the site, and copy your text out without the shortcodes.

How to add PHP: https://docs.generatepress.com/article/adding-php/

This archived topic is closed to new replies.