Support » Plugin: Insert Pages » Any way to insert page title without the CSS

  • Resolved effgee

    (@andreastyrosvoutis)


    I would really like the option to be able to insert the page title without any of the accompanying CSS

    I have some FAQ pages, and I’m using this plugin with Elementor in this way:

    Using the elementor toggle / accordion widget.
    In the title area I’m using
    [insert page=’2105′ display=’title’]
    And in the content area
    [insert page=’2105′ display=’content’]

    Works great as expected. But each title is coming with all the css formatting applied to the general CSS styles of the page titles.

    I would like it to return just the title text string and none of the formatting.

    Is there a way to have this plugin only return the title text with none of the styling?

    Also really appreciate the Elementor support you added recently that under the “Edit with Elementor” all pages that have been referenced/inserted into the Elementor document are availiable under that. Really saves alot of time instead of having to lookup page ids etc. Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Paul Ryan

    (@figureone)

    Three options I think:

    1) Use the inline param in the shortcode to print the title in a <span> instead of <h1>.

    2) Add custom styles for .insert-page h1 to make them appear how you want.

    3) Hook into insert_pages_wrap_content (priority 9 or earlier) and return strip_tags( $content );. Example:

    function insert_page_titles_no_markup( $content, $post, $attributes ) {
    	if ( 'title' === $attributes['display'] ) {
    		$content = strip_tags( $content );
    	}
    
    	return $content;
    }
    add_filter( 'insert_pages_wrap_content', 'insert_page_titles_no_markup', 9, 3 );
    Thread Starter effgee

    (@andreastyrosvoutis)

    Hello,
    Thanks for the reply.

    For 1.
    I cannot seem to find any examples of how to put the inline setting in the text shortcode mode. I see the option when using the widget but I’m using the shortcode for the titles, where would/how would I put the “inline” option? Could you write me an example?

    For 2.

    Originally I was trying to accomplish it with CSS and nothing was working. Thats why I made this post to you. Eventually I did manage some trickery with CSS but had to fudge it a bit with !important and had to use a plugin to assign that CSS to that specific page but its passable.

    For 3.

    I asked for knife and you gave me a chainsaw. šŸ™‚ Thank you! I may use this in the future.

    Thanks again Paul

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Any way to insert page title without the CSS’ is closed to new replies.