• Resolved NikoCodey

    (@nikocodey)


    Hello.
    I’m currently making a blog using wordpress.org, and i stumbled across a theme called The Box which is awesome, however, it doesn’t show the full posts and has a Read More on a post. I attempted removing Read More, but the text isn’t formatted properly and it doesn’t show fully:
    http://prntscr.com/biqem2
    and it should show like this:
    http://prntscr.com/biqf3k
    I’m getting really desperate here, and if anyone could help, i’d kindly appreciate that.
    Thank you in advance.

Viewing 9 replies - 1 through 9 (of 9 total)
  • Lisa

    (@workingwebsites)

    Hi Niko,

    First, can you supply a link to the actual site?
    I see the problem, but need to look at the code of the site to get a better idea of what’s going on. Thanks!

    Second, did the ‘text not formatted’ problem start when you removed the ‘Read More’ link?
    If so, how did you remove it? Was it done through the style sheet (CSS) or through coding the page?

    If it was done through the coding of the page, try and put it back, see if that re-formats the text properly.

    Removing the ‘Read More’ though CSS would be less invasive.
    In the stylesheet.css try:

    .more-link {
        display: none;
    }

    Third, the length of the excerpt.
    Right now it’s showing the first XX characters of the post. What you want is the full content.

    If you have ‘The Box Plus’ you can set it through the ‘Blog’ options.
    http://www.designlabthemes.com/the-box-documentation/#blog

    The Box Plus:
    http://www.designlabthemes.com/the-box-plus-wordpress-theme/

    Thread Starter NikoCodey

    (@nikocodey)

    Hi there Lisa, thanks for the fast reply, here’s my content.php and functions.php
    http://pastebin.com/g8mV9YYA
    http://pastebin.com/hiwAc1Dy
    (i only think i edited those two)
    The link is cppsinfo.com, however, i added a coming soon plugin since the website is not completed, so i have created an account for you so you can view the site.
    User: user
    Password: 4*HTcd)QbR@uxMHoT$Qb2mGW
    You can login at https://cppsinfo.com/wp-admin/ and then visit the website.
    Thanks for your help.

    Thread Starter NikoCodey

    (@nikocodey)

    The text not formatted was always there, the theme will format it like that, and when you click Read more, you’d see the formatted text properly.

    Lisa

    (@workingwebsites)

    Lisa

    (@workingwebsites)

    Hi Niko,

    It looks like you’re changing the theme’s files. I highly recommend setting up a child theme. It will make the process easier.
    See: https://codex.wordpress.org/Child_Themes

    As for the formatting, yes, I see there’s no new lines etc.

    In the content.php file of your child theme 😉 replace
    thebox_excerpt(xxx); with the_content();

    That will display all the formatted content on the page.
    See: https://developer.wordpress.org/reference/functions/the_content/

    If you want to use the excerpt, try the_excerpt();
    See: https://developer.wordpress.org/reference/functions/the_excerpt/

    Thread Starter NikoCodey

    (@nikocodey)

    Hi Lisa.
    Thank you so much! This fixed it completely and i’m so thankful.
    However, is there a way to put the header above the bar? Would look much better, i’m not sure how to do this, whenever i tried it gave me HTML errors.
    Shall i open a new question for this or can i continue here? Thank you so much again.
    http://prntscr.com/biv9gy

    Lisa

    (@workingwebsites)

    You should be able to move the header to above the bar.

    Try editing the Theme Header file (header.php).
    Near the bottom you will see something like:

    <?php $header_image = get_header_image();
    			if ( ! empty( $header_image ) ) { ?>
    				<a class="header-image" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    					<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
    				</a>
    		<?php } // if ( ! empty( $header_image ) ) ?>

    This is what generates the header.
    Move it to where you want it (above the menu).
    Make sure you include all the PHP code in that block so errors don’t happen.

    The menu code is above header image and looks like:

    <nav id="site-navigation" class="main-navigation" role="navigation">
    			<button class="menu-toggle"><span class="icon-font icon-menu"></span></button>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    		</nav><!-- #site-navigation -->

    In the end, it will look something like:

    <?php $header_image = get_header_image();
    			if ( ! empty( $header_image ) ) { ?>
    				<a class="header-image" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    					<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
    				</a>
    		<?php } // if ( ! empty( $header_image ) ) ?>
    
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<button class="menu-toggle"><span class="icon-font icon-menu"></span></button>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    		</nav><!-- #site-navigation -->

    Note: You may want to move the social links bar as well. You can move it around the same way.

    the last version of the theme (1.4.4) now uses the standard function the_excerpt() to display the post excerpt.
    you can use a child theme and then you can modify the excerpt using the filters that you can find here https://developer.wordpress.org/reference/functions/the_excerpt/

    The .more-link {display: none;} worked for me. Thank you Dearly Lisa.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘How to remove Read more?’ is closed to new replies.