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

Easy way bbpress => last comments #18

Open
bibliata opened this issue Jan 5, 2017 · 8 comments
Open

Easy way bbpress => last comments #18

bibliata opened this issue Jan 5, 2017 · 8 comments

Comments

@bibliata
Copy link

bibliata commented Jan 5, 2017

Would there be easy way to display last WP comments under the forum-like section at the bottom of front page (without having bbpress installed and implemented)?

@swashata
Copy link
Owner

I don't think it would be possible without writing out your own plugin.

@bibliata
Copy link
Author

Thank you. I think I managed it with some php code and no plugin.

On the plus side, I am using another plugin of yours I really likw (WP Feedback & Survey Manager)
Are you planing on updating it soon so all functions can work under the new WP versions?

//THANKS

@swashata
Copy link
Owner

WP Feedback & Survey Manager is actually deprecated long ago. I do have plans to make a lite and free version of eForm though. You can see the pro version and buy if you like :) https://iptms.co/geteform

@bibliata
Copy link
Author

Thanks. I think I figured it out with some modifications.
Now, where can I shorten the title of articles showing on front page
I'd like everything to be equal length and right now longer titles are hanging over the 2nd line
//THANKS

@xewl
Copy link

xewl commented Jan 27, 2017

That's a styling issue.

white-space: nowrap; overflow: hidden; text-overflow: ellipsis;

@bibliata
Copy link
Author

Actually my question was about php trim on and more specifically in which template file to trim the_title to so many characters so it will show shorter on the front page widgets. Thanks!

@xewl
Copy link

xewl commented Jan 27, 2017

That depends on what of post/page you would like to have this effect on.
If this is still the homepage like you mentioned, it would probably be the front-page.php-file.
Otherwise, it would be a custom file, which has its value set in the currently set "homepage"-page, a singular page, or an archive page.
This could help finding it in that case: WP Template Hiearchy

Edit:
In case of this theme, it's probably the content-single.php or single.php file where you can find your destiny. (I've kinda been out of WP lately.)

My first comment is still valid tho', you're hurting your SEO by outputting it like this programmatically, via eg. substring(the_title(),0,30)
I'd do it like this at style.css for a better example:
.entry-header.page-header > .page-title { display: inline-block; (max-)width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@bibliata
Copy link
Author

Thanks
The styling proposed did not do the trick. This particular theme does not follow front-page.php structure and has one. It uses boot strap from where it is hard to locate specifically which file calls the category widget titles. If we know that it will be easy to substring the titles

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

No branches or pull requests

3 participants