• Resolved ShigueS

    (@shigues)


    Hello,

    I am building a custom theme on my multisite installation of wordpress. Whenever I create a new page I can’t add paragraphs or line breaks in the text. Well I can see them, but after hitting the preview/publish button the text collapse into a single block (on the edit screen, inside wordpress). When I preview it on the actual page, it is all collapsed too.

    The strange part of it is that it won’t happen when I create a post. On post edit screen everything works fine. After publishing/previewing the text, the line breaks and paragraphs still where I put them.

    Maybe is something related to the database. I have the phpMyadmin plugin installed and I changed some tables’ collation to utf8_general_ci because I had problems with japanese characters.

    I am really lost here and would appreciate if anyone could help me.

Viewing 10 replies - 1 through 10 (of 10 total)
  • What is your theme’s page.php using to display the page content?

    Thread Starter ShigueS

    (@shigues)

    You mean the code? Is like this:

    <?php get_header(); ?>
    
    		<div id="primary" class="grid_8">
    			<div id="content" role="main">
    
    				<?php while ( have_posts() ) : the_post(); ?>
    
    					<?php get_template_part( 'content', 'page' ); ?>
    
    					<?php comments_template( '', true ); ?>
    
    				<?php endwhile; // end of the loop. ?>
    
    			</div><!-- #content -->
    		</div><!-- #primary -->
    
    <?php get_sidebar(); ?>
    <?php get_footer(); ?>

    Looks like your theme uses the content-page.php template file to output the pages content. You will need to look in that file.

    Thread Starter ShigueS

    (@shigues)

    Ok, Thank you for helping.

    The content of the content-page.php is this:

    <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
    	<header class="entry-header">
    		<h1 class="entry-title"><?php the_title(); ?></h1>
    	</header><!-- .entry-header -->
    
    	<div class="entry-content softShadow">
    		<?php the_content(); ?>
    		<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'toolbox' ), 'after' => '</div>' ) ); ?>
    		<?php edit_post_link( __( 'Edit', 'toolbox' ), '<span class="edit-link">', '</span>' ); ?>
    	</div><!-- .entry-content -->
    </article><!-- #post-<?php the_ID(); ?> -->

    There’s nothing wrong with that code. <?php the_content(); ?> will output the formatted page content. And given that I’ve used the Toolbox theme, I know that the template works just fine. Have you tried:

    – deactivating all plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).

    resetting the plugins folder by FTP or PhpMyAdmin. Sometimes, an apparently inactive plugin can still cause problems.

    Thread Starter ShigueS

    (@shigues)

    Ok. Thank you esmi!

    I will try those procedures and let you know!

    Is this a child theme or the parent Toolbox theme? If it’s the latter, have you modified the theme in any way?

    Thread Starter ShigueS

    (@shigues)

    I have modified the theme.

    Thread Starter ShigueS

    (@shigues)

    I have done what you suggested. The very first plugin I had activated seems to be the problem: qTranslate. If it is on, the paragraphs won’t work. If I turn it off… it works…

    Thread Starter ShigueS

    (@shigues)

    FIXED! It was a qTranslate plugin bug.

    I got the solution from here: https://wordpress.stackexchange.com/questions/42877/qtranslate-2-5-28-and-wordpress-3-3-1-issues/45371#45371

    Thank you esmi!

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Line breaks and paragraphs disappears after publishing page’ is closed to new replies.