• Hi, the plugin changes the HTML on restricted pages. In the excerpt i have a styled <pre> tag which is replaced in the restricted content excerpt with a <p> tag. Is there a way to change this behaviour.

    Many thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support jkleinithemes

    (@jkleinithemes)

    This sounds like more of a WordPress issue as RCP would not control the formatting (aka, the styling of) content. It restricts content based upon PHP and database calls. Are you using Gutenberg blocks or another type of editor?

    Thread Starter leekane

    (@leekane)

    Hi thanks for getting back, you nudged me in the right direction.

    WordPress has the the_excerpt function which strips and replaces html inside the excerpt.

    Restrict Content plugin uses rcp_excerpt_ function inside its /core/includes/misc-functions.php which does the same thing.

    So it was the Restrict Content plugin.

    However, by adding the tag that was being stripped to this line 291:

    rcp_excerpt_by_id( $post, $length = 50, $tags = '<pre><a><em><strong><blockquote><ul><ol><li><p>'

    i was able to display the excerpt as i wanted it.

    This is however not ideal, so i will try to add it via a function snippet in the child function file. Im not a developer so if you know how i can do this that would be of great help.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Restrict Content Pro changes the HTML on restricted pages’ is closed to new replies.