Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Eric Amundson

    (@sewmyheadon)

    Howdy Tronkin,

    You’ll want to customize the posts_loop_template.php file. Look for instructions here:

    I hope that helps!
    Eric

    Thread Starter tronkin

    (@tronkin)

    Thank you, Eric! That worked. One other question. How can we retain the original post formatting and media (audio, video, photo)? We’ve noticed that your plug-in takes the text of the post only and puts it into one continuous paragraph, removing all style and media. Thank you for your help!

    Tamara

    Plugin Author ivycat

    (@ivycat)

    Hey Tronkin,

    How can we retain the original post formatting and media (audio, video, photo)? We’ve noticed that your plug-in takes the text of the post only and puts it into one continuous paragraph, removing all style and media.

    Great question.

    Technically, it’s not that the plugin is removing your styles, it’s just that the HTML markup for the posts_loop_template.php file most likely doesn’t contain the classes and IDs and markup used in your theme.

    So, you have a few options:

    1. Inspect the HTML and CSS in your existing theme and adapt the posts_loop_template.php file to contain the same basic markup, classes and IDs.
    2. Add some new CSS to style the output of Posts in Page

      This thread may help:
      https://www.ads-software.com/support/topic/how-to-style-1?replies=4

      I hope that helps!

    Hi, Eric.

    I’m experiencing the exact same issue Tronkin had in the very top of this thread. I want to remove the ““Posted in [category] | Comments [on/off]” that automatically follows the snippet from the post article. It seems Tronkin understood your direction from the FAQ page, but I am not a coder and need more dumbed down explanation of how to accomplish this. Can you help me out? Thanks.

    Andre

    Plugin Author Eric Amundson

    (@sewmyheadon)

    Hey Andre,

    Sure.

    There is a template file that comes with the plugin and exists in the posts-in-page plugin directory called posts_loop_template.php.

    This file contains all of the basic code used to render the content you embed in a page using Posts in Page.

    If you want to tweak the output of Posts in Page at all, you should not change the posts_loop_template.php in the plugin folder, but rather copy that file to the root of your active theme.

    The PiP plugin looks in your active theme directory for this file and, if it finds it, it’ll be used to render PiP output instead of the default file that comes with the plugin.

    So, once you copy that sucker into your theme directory, you’ll want to open it up in a text editor and remove the line that is inserting the meta information you’d like to delete: “Posted in [category] | Comments [on/off]”.

    When you open the default posts_loop_template.php file, you’ll see:

    <!-- NOTE: If you need to make changes to this file, copy it to your current theme's main
    	directory so your changes won't be overwritten when the plugin is upgraded. -->
    
    <!-- Start of Post Wrap -->
    <div class="post hentry ivycat-post">
    	<!-- This is the output of the post TITLE -->
    	<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    
    	<!-- This is the output of the EXCERPT -->
    	<div class="entry-summary">
    		<?php the_excerpt(); ?>
    	</div>
    
    	<!-- This is the output of the META information -->
    	<div class="entry-utility">
    		<?php if ( count( get_the_category() ) ) : ?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>
    		<?php
    			$tags_list = get_the_tag_list( '', ', ' );
    			if ( $tags_list ):
    		?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>
    		<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    		<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    	</div>
    </div>
    <!-- // End of Post Wrap -->

    You’ll want to lose all the meta information, you’ll remove:

    	<!-- This is the output of the META information -->
    	<div class="entry-utility">
    		<?php if ( count( get_the_category() ) ) : ?>
    			<span class="cat-links">
    				<?php printf( __( '<span class="%1$s">Posted in</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-cat-links', get_the_category_list( ', ' ) ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>
    		<?php
    			$tags_list = get_the_tag_list( '', ', ' );
    			if ( $tags_list ):
    		?>
    			<span class="tag-links">
    				<?php printf( __( '<span class="%1$s">Tagged</span> %2$s', 'twentyten' ), 'entry-utility-prep entry-utility-prep-tag-links', $tags_list ); ?>
    			</span>
    			<span class="meta-sep">|</span>
    		<?php endif; ?>
    		<span class="comments-link"><?php comments_popup_link( __( 'Leave a comment', 'twentyten' ), __( '1 Comment', 'twentyten' ), __( '% Comments', 'twentyten' ) ); ?></span>
    		<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="meta-sep">|</span> <span class="edit-link">', '</span>' ); ?>
    	</div>

    So the end result might look like this:

    <!-- NOTE: If you need to make changes to this file, copy it to your current theme's main
    	directory so your changes won't be overwritten when the plugin is upgraded. -->
    
    <!-- Start of Post Wrap -->
    <div class="post hentry ivycat-post">
    	<!-- This is the output of the post TITLE -->
    	<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
    
    	<!-- This is the output of the EXCERPT -->
    	<div class="entry-summary">
    		<?php the_excerpt(); ?>
    	</div>
    </div>
    <!-- // End of Post Wrap -->

    Let me know if that helps.

    Cheers!

    Thanks, Eric. Where is the theme directory you’re referring to? Do I access that through the FTP or is it accessed in the WP application in the theme editor?

    Plugin Author Eric Amundson

    (@sewmyheadon)

    Where is the theme directory you’re referring to? Do I access that through the FTP or is it accessed in the WP application in the theme editor?

    It’s in the WordPress filesystem. You can usually access this through FTP or via your host’s file manager, if they offer one.

    On a traditional WP setup, I’d look in your main site’s folder under /wp-content/themes/<your_theme_name> where your_theme_name is the slug, or folder name, of your currently active theme.

    So, if you’re using the Twenty Sixteen theme, for example, it would go in:

    wp-content/themes/twenty-sixteen/

    Does that help?

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘How to remove category & comments?’ is closed to new replies.