Search
 
SCRIPT & CODE EXAMPLE
 

PHP

wordpress post excerpt from post id

<?php
$post = get_post( $post );
$excerpt = get_the_excerpt(); || ( $post->post_excerpt ) ? $post->post_excerpt : $post->post_content;
 
$excerpt = substr($excerpt, 0, 260);
$result = substr($excerpt, 0, strrpos($excerpt, ' '));
echo $result;
?>
Comment

PREVIOUS NEXT
Code Example
Php :: check image exist or not in laravel 
Php :: how do i logout wordpress without confirmation 
Php :: get the value of href in anchar tag php 
Php :: isset submit in php 
Php :: php if string is already in database 
Php :: php JSON_PRETTY_PRINT and ? 
Php :: lazychaser laravel-nestedset get tree 
Php :: laravel gigapay get single invoice 
Php :: post thumbnail 
Php :: create guid in php 
Php :: laravel form method delete 
Php :: wordpress add submenu 
Php :: moodle webservice create user phone2 
Php :: explode last element php 
Php :: union of two arrays in php 
Php :: laravel install production 
Php :: PHP Fatal error: Constructor test::test() cannot declare a return type in /home/iBMCb9/prog.php on line 6 
Php :: get first 200 characters string php 
Php :: php remove slashes from json 
Php :: CORSS oauth/token lavarel 
Php :: php string contains string 
Php :: php return json 
Php :: how to delete a file in laravel 
Php :: get file name from file path in php 
Php :: get specific key value from array php 
Php :: php number to month 
Php :: laravel get input from request 
Php :: php trim array to certain length 
Php :: Carbon Format date with timezone in views Laravel 
Php :: bind in pdo 
ADD CONTENT
Topic
Content
Source link
Name
2+3 =