how to limit post content in wordpress blog - wordpress

I want to limit the content of post on wordpress blog home. So after specific amount of words content should be limited and there would be a link saying Read More..
Plz guide me how it can be done in php wordpress theme

There is a tag in the WordPress editor which you can use to specify the cutoff point on a blog/page excerpt.
You just have to click this button where you want the cutoff to happen
Then within your template, you just need to add the first parameter to the_content() and it will show the content up till that cutoff. If the parameter is not set, it will show all the content.
For example:
the_content('Show more...'); // shows content till the cutoff then shows the text supplied
the content(); //shows all the content
Read more about the more tag here: http://codex.wordpress.org/Customizing_the_Read_More

Related

Post content/image not showing up on a wordpress website; only when clicking on the post it shows

I can't find the solution to this problem. On my wordpress page some content is showing up and some content is not. Usually if I made a post of just a single image this image is not shown unless it is featured. Is there a way to change this for all my posts?

Remove text on WooCommerce Shop Page for Product

I'm working on a woocommerce storefront for a client that has a custom-built theme (by someone else) and for the life of me cannot find where I need to go to remove the subtext over the product preview on the main Shop page (the "at vero...")
See below:
Inspect element shows:
When I went into the wc-template-functions.php file I found the product_loop but there is nothing in here that I see generating the paragraph below the product title. Before I write some css to locate the <p> child element under parent woocommerce-LoopProduct-link woocommerce-loop-product__link - is there someone within WC functions I can locate this? The product has no categories or tags as I thought this could be where it was coming from. My Google searches have resulted in nothing specific to what I'm looking to change on the shop page, just changes to the product page which I do not need.
you can simply hide using CSS instead of change in core files

Wordpress rss-feed is not showing ful text of a post

I have built a custom theme using understarp theme and I am unable to see summary or full text of my post in my RSS-feed. it starts showing text only when I add something in the excerpt field and still it shows only the content of excerpt field.
is it possible to show the full text of a post in RSS feed or no?
problem was, we were adding some ads HTML in the content of my posts using "the_content" filter and we were returning the updated content only in an "if" statement. I noticed there was no return statement for "else" so that's why it was giving me empty content

How can I hard coded comments area to be shown in particular pages in wordpress?

In my sites I use static page as a front page, and I did some other static pages to show some special static content (and embedded object) but this page sin particular I want to have the comment area shows.
My question is: how to enable comments -preferred hard code- in particular pages? at least having the same category?
I am using wordpress 4.1 and Avada Theme.
Well you can disable the comments on over all website by going to settings discussion and then uncheck the box that says, allow people to comment on new articles. This will remove all the comments on new pages and posts (starting from now). Now when you create a new page/post click on the button on the top that says "screen options". Check the box that says "discussion". Now you will have a new field in your post from where you can enable/disable the posts individually.
If you want to do it through the code, one way would be to create separate files for each page e.g page-contact.php, So when someone goes to the contact page, this file will be served, it can be a clone of page.php and just needs the comment part removed. Another way would be to goto page.php and wrap the comments code with a condition like
if(is_page('contact') || is_page('about')){
// code to show comments. Comments will be shown on contact and about page
}

Wordpress - How to do an excerpt of blog content without striptags

In wordpress, it can print a list of blog entries with excerpts. When you click on a blog entry, it takes you to the full article.
My problem is that wordpress applies something like a "strip html tags" function to the excerpts, so that it removes ul,li, superscript, tags etc...
Is there a way to either prevent this, or be selective of which tags to strip out? I definitely want to keep the superscript tag.
If you want to control the excerpts contents, I suggest using Advanced Excerpt Plugin, or quite simply
the_content();

Resources