Community Forums › Forums › Archived Forums › Design Tips and Tricks › Short Code for include_content not displaying at 100%
Tagged: Altitude Pro, include_content, shortcode
- This topic has 9 replies, 4 voices, and was last updated 8 years, 6 months ago by chrisjeub.
-
AuthorPosts
-
May 16, 2016 at 6:50 pm #185737chrisjeubParticipant
I am following instructions at https://en.support.wordpress.com/display-posts-shortcode/ to custom a page that will display (1) the first post and (2) an archive. I added include_content to include all the content, but the display squeezes the margins in to make it look very awkward. I cannot figure out how to fix it, and I suspect this is a problem with the Altitude Pro Theme that I hope I can fix quickly.
The code in question is:
[display-posts category="monday" posts_per_page="1" include_content="true" image_size="normal" wrapper="div"]I haven't added the page to my menu yet, so until I get this fixed you can see the problem live at https://monumentpublishing.com/monday/. A screenshot is below, and as you can see, the text should align as wide as the picture.
https://monumentpublishing.com/monday/May 16, 2016 at 10:58 pm #185745ChristophMemberHi,
you could try changing the padding in .full-width-content .content
May 17, 2016 at 3:51 am #185753chrisjeubParticipantI tried playing with this in my stylesheet under Content, but nothing seemed to take. I'm an amateur with CSS, so I may be doing it wrong. I adjusted the padding here, but no change worked:
.full-width-content .content {
padding: 0 200px 50px;
width: 100%;Any other suggestions? Or more guidance of how to change the padding in .full-width-content .content?
May 17, 2016 at 5:59 am #185754Victor FontModeratorChanging the padding is the way to fix it. I just tested this with my browser's inspect element tool and it works fine:
.full-width-content .content { padding: 0 100px 50px; width: 100%; }
If you make changes to CSS and you don't see them, deactivate all caching plugins while you are working, clear the browser's cache, and hold down the shift key when you refresh the page to force the browser to reload the style sheet.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?May 17, 2016 at 6:12 am #185757chrisjeubParticipantThanks! That did help, but the shortcode is still not displaying the complete content as it does in the actual blog post. Compare these two links:
Blog Post (how I would like it to display): https://monumentpublishing.com/monument-monday-16/
Page (where it doesn't layout well): https://monumentpublishing.com/mondayAnother issue: Dynamic code does not list properly in the page. I have shortcodes that dynamically build the Blog Post, and they aren't rendering when I attempt to do the same on the Page.
I hope this makes sense. Let me know if you have another solution.
May 17, 2016 at 8:11 am #185763Victor FontModeratorWhen I look at those two pages, the blog content is identical. I don't know what you mean by the dynamic code.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?May 17, 2016 at 8:23 am #185765chrisjeubParticipantIt appears that if short code is used in the post that the short code from the page is retrieving, it doesn't retrieve it.
Note the heading "This Week's Content" on https://monumentpublishing.com/monument-monday-16/. It is followed by the three articles. In Monument Monday #16 post, a short code draws the latest blog posts in different categories.
Note the heading "This Week's Content" on https://monumentpublishing.com/monday. It is not followed by the three articles. It skips right over them.
It appears that these are separate issues, but I'm not totally sure. The issues as I see them:
(1) Short Code for include_content not displaying at 100%.
(2) Short code including content from article with another short code does not display the content at all.May 18, 2016 at 6:53 am #185831Victor FontModeratorAt this point, you should probably contact Bill Erikson, the plugin's author: https://wordpress.org/plugins/display-posts-shortcode/.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?May 18, 2016 at 8:21 am #185841billericksonMemberYes, you are correct. When you use [display-posts include_content="true"], it strips out any instances of the [display-posts] shortcode in that resulting output. This is by design.
Without this feature you could break your website with an infinite loop. If you include_content and one of those posts also has a shortcode that includes_content linking to the current page, the infinite loop will break your site.
This feature will never be removed from the Display Posts Shortcode. If you want to run the risk of breaking your website, you can manually edit the plugin and remove the add_filter() and remove_filter() lines here: https://github.com/billerickson/display-posts-shortcode/blob/master/display-posts-shortcode.php#L423-L428
I also recommend you change the plugin version number to something high, like 99, right here ( https://github.com/billerickson/display-posts-shortcode/blob/master/display-posts-shortcode.php#L6 ) so that when the plugin is updated your manual edits are not lost.
May 19, 2016 at 4:27 am #185887chrisjeubParticipantThat explains things. It revises my content strategy, too. Thanks Bill, I appreciate the special attention!
-
AuthorPosts
- The topic ‘Short Code for include_content not displaying at 100%’ is closed to new replies.