Patrick Jackson
Forum Replies Created
-
Forum: Plugins
In reply to: [Posts in Page] How to display latest post in page centered?Haha, if we get this to work, I’ll be sure to raise a pint in your honor.
On the centering issue, you might be able to add the following to your CSS. It usually takes me a little trial and error to get things like that right.
.hentry { text-align: center; }
As for adding the image, you’ll need to look at creating a custom template. Here’s a discussion on that topic. Maybe take a look and let me know if you need some more details.
Cheers! []3
Forum: Plugins
In reply to: [Posts in Page] % Comments MarginIt doesn’t look like the plugin is setting a class when you switch languages. That’s the only way I can think of to customize your styling based on the language.
I’m not sure which plugin you’re using, but I think the best advice I can give you is to either work with the plugin developer to add the classes, or try a different language plugin that sets a language class.
If you need to use that plugin and can’t get it to work, then you’ll probably need to do some development work to detect which language is selected, and add a class to the body tag. That’s pretty advanced, so you may need to hire a developer for that.
Forum: Plugins
In reply to: [Posts in Page] no formatting in page…Hi badhatsam, thanks for your post and your solution!
I have a couple of suggestions that may helpful in this context.
The first is to help with future-proofing your customization. If you decide to update the plugin, there’s a good chance your customization will be overwritten and lost. To avoid this, you can create a copy of that posts_loop_template.php file and place it in your theme directory. That custom template should take precedence over the default one that comes with the plugin. Even if you update the plugin, your customized template in the theme directory should continue to be used.
The other suggestion relates to your original question about HTML in the post excerpt. Your solution of replacing the excerpt with the complete content of the post DOES work, but there’s another solution if you only want the shorter excerpt to show, and don’t want to edit the plugin template.
It’s normal behavior for HTML to be filtered out of the Excerpt by default. However, if you enter content in the Excerpt field on the post editor, this will be used in place of the default excerpt. When you use this, it should allow you to add html such as links, etc.
Quoting from the Codex…
To add an excerpt to a post, simply write one in the Excerpt field under the post edit box. An excerpt can be as short or as long as you wish. Usually, given its purpose, a couple of sentences is fine. If adding the excerpt manually, you may use (some) HTML formatting and the tags will not be stripped.
Note: As of WordPress version 3.1, some screen options on the Post & Page edit Administration Panels are hidden by default. The Excerpt field is hidden by default if it has not been used before.
Hope you find some of that helpful. ??
Forum: Plugins
In reply to: [Posts in Page] How to display latest post in page centered?Oh, if you want to show ONLY the latest post, then you should be able to do that using the showposts attribute.
[ic_add_posts showposts="1"]
Forum: Plugins
In reply to: [Posts in Page] How to display latest post in page centered?Hi gordonf238,
First of all, you’re welcome! I hope you find the plugin useful.
On the subject of centering, if you’re talking about shifting the block of content output by the plugin to the center of the containing page, then that’s probably something handled in the theme template for the page.
When we do testing for this plugin, we start with an empty WordPress instance: no other plugins and the default WordPress theme. When we do this, the content output by the plugin is centered on the page, so I’m thinking your theme is probably shifting it off-center.
It’s normal — and often desirable — for a theme to affect the plugin output. Sometimes, you need to tweak that styling to get it just right.
Given that, you may be able to fix your issue with some custom (CSS) styling. You may also need to add some HTML to wrap the shortcode, or you may have to edit the page template.
Can you provide a link to your page? Do you know how to add custom CSS to your site?
As for listing the latest post by date, this is the default behavior of the plugin, so if I just used the simplest shortcode on a page,
[ic_add_posts]
, then I would expect to see the list of all posts in reverse order by date published (latest one first).Are you experiencing something different?
If so, can you tell me what you’re seeing, what you want to see, what shortcode you’re using, and provide a link to the page?
That should help me to point you in the right direction. ??
Forum: Plugins
In reply to: [Posts in Page] % Comments MarginHi Uendi,
My understanding is that you’re publishing the same page in different languages, right?
The only way I can think of to handle that would be to add adjustments to your CSS for the languages that need them.
Have you checked to see if your
<body>
tag includes a language class? If not, I think you can add it using theget_bloginfo()
function. Once you get the language class in your body tag, you can use that to customize the styling based on the language.Here’s a discussion about one way to do that.
Does that help any? Let me know if need more help with how to add the function and edit your css.
To help more, I’ll probably need a link to your page and more information about how you’re handling the translation (for example, are you using a plugin?).
Forum: Plugins
In reply to: [Posts in Page] How to remove "Posted in… | Comments OffGood catch pothound, thanks! ??
Forum: Plugins
In reply to: [Posts in Page] Category within Custom Post TypeHi johnnyr209,
The category attribute applies to the category taxonomy built in to wordpress, used by regular posts. It may also be added to custom post types by adding ‘category’ to the list of taxonomies when registering the post type.
If that’s the case, then the list of categories you see available for your custom post type will be the same list you see for a regular wordpress post.
From the behavior you’re describing, It may be that your ‘clinic-pictures’ is actually a term in a custom taxonomy.
You may want to try using the attributes for a custom taxonomy and term.
[ic_add_posts tax='taxonomy' term='term']
So, your example might look like the following.
[ic_add_posts post_type='grad_resource' tax='custom-category' term='clinic-pictures']
…where custom-category is the slug for your custom taxonomy.
Does any of that help?
Forum: Plugins
In reply to: [IvyCat AJAX Testimonials] Numerical pagination requestHi jvandelaar, I’m glad to hear you love the plugin!
Unfortunately, I don’t see an easy way to replace the existing prev/next links with numerical pagination right now, although I think it would be a nice improvement. The prev/next functionality is custom to the plugin, so the only way I can see to add it would be to go in and update the plugin core.
I’ve added an enhancement request to the github repository, so it’ll be on our radar.
Does anyone else have a suggestion here?
Development contributions are always welcome if anyone would like to pitch in! ??
Hi ugene,
I double-checked the first shortcode, and it seems to work as expected for me. After creating several posts, setting the sticky option, and adding them to the sticky category, the shortcode displays only the latest sticky post.
You might want to double-check your shortcode in the text mode of the editor (rather than visual) as sometimes extra characters can be inserted that don’t show up in visual mode. Failing that, you may want to check for a plugin or theme conflict.
On the second shortcode, if you delete the ignore_sticky_posts=’yes’ attribute, it should ignore the sticky posts since the shortcode does that by default. It’s natural to expect that setting the attribute to yes would also work, but it doesn’t. I’ve submitted a bug report about that.
Hi suascat_wp,
The way I’ve seen other people handle a requirement like this is to create a category for sticky posts, and use two short codes: the first one just shows the sticky posts, and the second shows all others by ignoring sticky posts.
So you might add a category called “sticky”, add the sticky posts to that category, then add the following shortcodes to your page.
[ic_add_posts category='sticky' ignore_sticky_posts='no'] [ic_add_posts]
The plugin doesn’t support showing only sticky posts, but this feature is on the list of proposed enhancements for a future release. I’ll add your post as a vote to have that feature added.
Forum: Plugins
In reply to: [Posts in Page] Post title is not showingHi mlandes,
It looks like you have some CSS that is setting the title to display: none;
So, the HTML for the title is actually being output, but somewhere in your theme or in your site, something else has set the title to be invisible using the following CSS statement.
.page h1.entry-title, .home .page h2.entry-title { display: none; }
the .home .page h2.entry-title selector is what is causing the problem, because in the plugin template, the titles are wrapped in h2 tags with a class of entry-title, and this is being displayed on the home page. So while it may have been unintentional, the CSS above matches the titles in our template, and the browser is being directed not to display them.
How do you fix this? I can think of a couple of solutions.
1. Find out where that CSS is and delete it. If a plugin is adding it, you could remove the plugin. This may or may not break something else in your site, since I’m guessing that CSS was there for a reason.
2. Create and Edit a custom Posts in Page template to use a different class for titles so that the CSS statement will no longer apply.
I can’t help much with the 1st option without full access to your site. As for the second option, here’s a link to a post that discusses creating a custom template (for another purpose). You’ll want to create a copy of the posts_loop_template.php file from the plugin, and place it in your active theme directory.
Once you have a custom template working, look for the following line responsible for printing the post titles.
<h2 class="entry-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
Change the class in that first tag that goes
<h2 class="entry-title">
so that it says something different: maybe “entry-title-2” or something. Then that snippet would look like the following.<h2 class="entry-title-2"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
Since the CSS would no longer apply, it should make your titles visible.
Let me know if this helps at all.
Forum: Plugins
In reply to: [Posts in Page] Would like to remove all tags from rendering on postsHi Dr_Bob,
I’m glad to hear you’re finding the plugin useful.
In order to change the layout of the output in the way you’re describing, you’ll need to create a copy of the plugin’s template, place it in your theme directory, and edit that copy.
Here is a post that discusses creating and editing a custom template.
In your case, since you want to remove the list of Tags, you’ll want to delete the code responsible for printing that list.
Here is a snippet from the plugin template (posts_loop_template.php).
<!-- 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>
I think if you delete the following, you will get close to what you want.
<?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; ?>
Doing so will result in that first snippet looking like the following.
<!-- 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; ?> <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>
Does that help?
Forum: Plugins
In reply to: [Posts in Page] Help adding a divider line between posts.1 is something you could add to the bottom of the posts_loop_template.
2 is something you would add as custom CSS; probably to a custom CSS field in the back end of your theme.
If you can’t find someplace to add custom css in your theme, you may want to look at a plugin such as Simple Custom CSS or Jetpack’s Custom CSS.
Forum: Plugins
In reply to: [Posts in Page] ..More link not workingHi mlandes,
I’m sorry to hear you’re having trouble with your more link.
Do you have a link to the page so I can see the issue?
What method did you use to add the More link?
If you added custom code to the template, can you show what you did?
Can you tell me about your theme and other plugins? Anything that might be affecting the more link there?
It sounds like you may have already seen some related posts on the subject, but if you haven’t seen it already, here’s a post about adding a more link.