Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No images or headings show in content #72

Open
DominiqueBlogs opened this issue Oct 11, 2019 · 7 comments
Open

No images or headings show in content #72

DominiqueBlogs opened this issue Oct 11, 2019 · 7 comments

Comments

@DominiqueBlogs
Copy link

My images and headings are not showing in the content

@sewmyheadon
Copy link
Member

My images and headings are not showing in the content

Can you tell us:

  1. what shortcode you're using
  2. if/how you've customized your output template?

By default, the output of Posts in Page doesn't show all of the data but you can tweak the output. Check the pinned threads at the top of the WP.org support forum here:

https://wordpress.org/support/plugin/posts-in-page/

Thanks!

@DominiqueBlogs
Copy link
Author

DominiqueBlogs commented Oct 18, 2019 via email

@sewmyheadon
Copy link
Member

Howdy Dominique,

Okay - I think I can help here.

I have not yet customised my output template as I am unsure of how to do this. I’m not sure where in the theme directory I am supposed to edit. I’m quite scared I will mess everything up!

At the moment, only the text of the content is showing. There are no sub-headings or pictures like on the original post.

By default, the Posts in Page plugin has a modest output that contains only the Excerpt, rather than the full Content of the post. If you have explicitly added an excerpt to the post, it should display what you entered but if you haven't added an excerpt, WordPress will make one based on the settings in your site or theme.

Usually, that means that it takes the first X number of words or characters from the post's content, strips the HTML, and displays it.

That's the catch: excerpts are pretty much just plain text so images, headings, or other HTML formatting that you entered in the main content of the post won't show.

The good news is that it's not to hard to address this.

First, before you customize anything, you need to copy the posts_loop_template.php from the plugin's template directory to your theme directory and make changes as necessary.

You can even rename it – but make sure to indicate that in the shortcode using the template='template_name.php'.

These templates must exist in the theme directory or in a sub-directory named posts-in-page. I'd recommend creating a posts-in-page directory to keep your theme organized.

Once you’ve copied that file, open it and look at line 24:

<!-- 	This outputs the post EXCERPT.  To display full content including images and html,
	replace the_excerpt(); with the_content();  below. -->
<div class="entry-summary">
	<?php the_excerpt(); ?>
</div>

Change to:

<!-- 	This outputs the post EXCERPT.  To display full content including images and html,
	replace the_excerpt(); with the_content();  below. -->
<div class="entry-summary">
	<?php the_content(); ?>
</div>

I hope that helps!

@DominiqueBlogs
Copy link
Author

DominiqueBlogs commented Oct 18, 2019 via email

@sewmyheadon
Copy link
Member

Hello Dominique,

Not sure where you're hosting the site but the path for the theme directory is usually:

yoursitename.com/wp-content/themes/your-theme-name/

Usually, you'd get to it via FTP or your hosting account's file manager if they provide one.

Does that make sense?

@DominiqueBlogs
Copy link
Author

Hi there,

I feel a bit silly as I have tried to edit to show all content but I'm still not understanding how to do this. I'm not sure I am editing the right bit and what information I need to be putting and where?

I have been advised by wordpress to create a child theme in order to make changes?

I have a wordpress site and siteground is my hosting provider.

I will continue to research and try and solve this in the meantime.

Kind Regards,
Dominique

@priyankpatel-multidots
Copy link
Contributor

Hello DominiqueBlogs,

I am sorry for the late reply here.
I think you can share the template file here with us and the path where you have added the template file.
We will look into it and try to provide the solution after you share the details.

Thanks for using the plugin,
Team Ivycat

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants