• Hi,

    I have a custom theme I had built for me, for which all the content is built around pages. I need to add a singular post, however when I do, I get a header titled ‘My freestyle blog’ and an image of a group of people at the top of the page – accompanied by a butterfly image on the left hand side of the page.

    After a lot of looking around for a solution I found that by editing the single.post.php I could eradicate the image, however now have the text http://plma.com.au/wp-content/themes/PLMA/ appearing at the top of the page. I am assuming this is because I have deleted something that is related to the theme, however am not sure how to remove it. I am reluctant to revert back to the original code given it contains the ‘my freestyle blog’stuff on it!

    Below is the code on the page that is throwing this error, and I have also below that paste the original code for reference. Appreciate any help.

    CURRENT CODE CAUSING ERROR

    <?php
    /**
     * @package WordPress
     * @subpackage HTML5-Reset-Wordpress-Theme
     * @since HTML5 Reset 2.0
     */
     get_header(); ?>
    <div class="category-page">
    		<div class="aside-wrapper four columns">
    			<aside>
    
    				<hr>
    				 <?php include(TEMPLATEPATH . '/sidebar-custom.php');  ?>
    
    			</aside>
    
    		</div>
    
    	 <div class="twelve columns category-list">
    		<article class="post" >
    		<hr>
    		<p style="text-align: center;"><?php echo get_template_directory_uri(); ?>/</p>
    	 <h3 class="entry-title"><?php the_title(); ?></h3>
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    			<div class="entry-content">
    				<?php the_content(); ?>
    				<?php //posted_on(); ?>
    			</div>
    				<div class="navigation">
    					<div class="alignleft">
    						<?php previous_post('« « %','previous: ', 'yes'); ?>
    					</div>
    					<div class="alignright">
    						<?php next_post('% » » ','next: ', 'yes'); ?>
    					</div>
    				</div>
    			<?php endwhile;
    				endif ?>
    			<?php edit_post_link('Edit this entry','','.'); ?>
    			 <div style="font-size:11px;font-style:italic;text-align:center;padding-top:55px;"></div>
    		</article>
    
    	</div>
    	<div class="four columns show-in-mobile">
    
    				<hr>
    			 	<?php include(TEMPLATEPATH . '/sidebar-custom.php');  ?>
    
    		</div>
    
    	</div>
    <?php  //get_sidebar(); ?>
    
    <?php get_footer(); ?>
    
    ORIGINAL CODE
    
    <?php
    /**
     * @package WordPress
     * @subpackage HTML5-Reset-Wordpress-Theme
     * @since HTML5 Reset 2.0
     */
     get_header(); ?>
    <div class="category-page">
    		<div class="aside-wrapper four columns">
    			<aside>
    				<h3>My FreeStyle Blog‏</h3>
    
    				<hr>
    				 <?php include(TEMPLATEPATH . '/sidebar-custom.php');  ?>
    					<img src="<?php bloginfo( 'template_directory' ); ?>/_/images/aside-logo.png">
    			</aside>
    
    		</div>
    
    	 <div class="twelve columns category-list">
    		<article class="post" >
    		<hr>
    		<p style="text-align: center;"><img class="size-medium wp-image-40137 aligncenter" alt="my_freestyle_01_purchase" src="<?php echo get_template_directory_uri(); ?>/_/images/blog-banner.png" width="100%" height="100%"></p>
    	 <h3 class="entry-title"><?php the_title(); ?></h3>
    			<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    
    			<div class="entry-content">
    				<?php the_content(); ?>
    				<?php //posted_on(); ?>
    			</div>
    				<div class="navigation">
    					<div class="alignleft">
    						<?php previous_post('« « %','previous: ', 'yes'); ?>
    					</div>
    					<div class="alignright">
    						<?php next_post('% » » ','next: ', 'yes'); ?>
    					</div>
    				</div>
    			<?php endwhile;
    				endif ?>
    			<?php edit_post_link('Edit this entry','','.'); ?>
    			 <div style="font-size:11px;font-style:italic;text-align:center;padding-top:55px;">Blogs posted are strictly the opinion of the blog authors and monitored regularly by Abbott Diabetes Care</div>
    		</article>
    
    	</div>
    	<div class="four columns show-in-mobile">
    
    				<h3>My FreeStyle Blog‏</h3>
    
    				<hr>
    			 	<?php include(TEMPLATEPATH . '/sidebar-custom.php');  ?>
    				<img src="<?php bloginfo( 'template_directory' ); ?>/_/images/aside-logo.png">
    
    		</div>
    
    	</div>
    <?php  //get_sidebar(); ?>
    
    <?php get_footer(); ?>

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hi

    It’s hard to pinpoint the cause without looking at the other associated files.

    You can try reverting to the original code and applying style="display:none;" to the <h3> and the <img> to see if that helps restore the site.

    Also ensure that you haven’t overwritten the site’s index.php file (in the WordPress root dir) by mistake.

    Let me know how it goes 🙂

    I have a custom theme I had built for me

    Since that is a custom theme we ask that you please go to developer for support.

    Forum volunteers are also not given access to commercial products, so they would not know why it is not working properly. Other community members who may have faced your issue might be able to help you but your best bet is your product’s developer.

    What does http://plma.com.au/ and their custom theme, PLMA (the error message) have to do with https://www.abbottdiabetescare.com/ (from the original code) ?

    @mktimpact, it looks like it’s this part that’s the problem:

    <p style="text-align: center;"><?php echo get_template_directory_uri(); ?>/</p>

    because the get_template_directory_uri() function displays the path to the theme folder, i.e., http://plma.com.au/wp-content/themes/PLMA/

    So, try removing that piece from your code.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Removing visible code from a single post’ is closed to new replies.