First of all return
is used in PHP to return a value from a function. If you want to display something you need echo.
Second, no excerpt is displayed in the lines you are pointing to. The excerpt is retrieved and then stored in a variable $myExcerpt
. If you want to add ...
to the excerpt you must look in your code where it is displayed. This happens in several lines near the end of the code where under different conditions there are lines like this:
echo '<p class="phome">'.$myExcerpt.'</p>';
You easily get your three dots by changing that to
echo '<p class="phome">'.$myExcerpt.' ...</p>';
Related Posts:
- Custom excerpt function re-factoring
- Mass update excerpt
- How does printf( __( ) ); work?
- Return HTML Template Page with PHP Function
- Is there a way to parse shortcodes in PHP?
- Static Frontpage Pagination – Custom loop
- Get the php template file from other theme folder
- How to return the_excerpt (without echo)?
- On this day PHP code
- How to loop over custom fields in a page template?
- Limit the_excerpt with max of x characters
- Remove at the beginning of the_excerpt() with str_replace
- Automatic Excerpt Not Working
- Trim first 2 words of the exceprt
- Use Timber/Twig to pull an image by image ID [closed]
- Unable to set right time in admin and frontend template
- Easiest way to show total number of subpages
- Blank space at beginning of tag?
- Link to file in plugin directory from wordpress template?
- Why does running get_the_excerpt() when generating JSON file take 28 seconds vs. 599 milliseconds without it?
- Password protecting content in custom template
- Add a Second Menu to a theme that only support 1 menu
- Inject PHP code into “sidebar-content” – code before my WooCommerce sidebar widget?
- How to display user nickname (not display name) in PHP template?
- Custom Template 404 for specific custom post type
- How to properly insert a link to a template in WordPress?
- Custom field value not saving when it contains a URL?
- How to Display a Single Post Excerpt
- How to remove the excerpt in the Dzonia Lite theme
- Render ninja form inside markup
- How can I get a single php file that is the equivalent of an existing WordPress page?
- Custom search results page not working with empty search
- I have a problem in the order of enqueues while enqueuing stylesheets and scripts for a specific page in my function.php
- How to show single category archive
- Issues getting PHP to display in category pages
- Change title only in dynamic page
- Secondary navigation menu on one page
- Enable custom logo upload if logo is not in header
- How can I edit the content in index.php? [duplicate]
- Query Pages and post excerpts dynamically
- Woocommerce Show Single Product on Homepage
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- Show a different code on front page to other pages
- Does wordpress templates always in files or in database?
- PHP include is only working in certain places in my custom WP theme
- Use WordPress function in php file
- Adding wrapper elements in the_date() like in the_title()?
- How to get all author posts outside of author templates
- stripping tags from excerpt in WordPress is not working
- How do I define a lookup table that will work across all PHP elements of the template?
- persist a variable set in header.php all the way down to footer.php
- Function Reference Documenting Template Tags for use in Custom Theme Templates?
- How to set a template with wp_insert_post
- Why is a wp function used in current PHP namespace’s callback not resolved to global scope?
- Automatic excerpt is not shown with the_excerpt() command
- Why does the Woocommerce grouped template prints the unpublished products?
- What’s a good way to allow overwriting files within a child theme if I want the same folder structure?
- Advice on creating a WP Archive Template with Custom Taxonomy (get_term_meta)
- How to render a block from php template
- Override Admin menu icon
- How to suppress template-parts in undescores?
- Creating custom page template from existing PHP site
- Remove   from the_excerpt
- Shortcodes showing in excerpt despite using strip_shortcodes
- How to remove the space before the ellipsis in excerpt?
- How do I query a single data value from the wp_metadata table?
- Need help removing […] after excerpt
- Conditional string comparison failing for basename/slug
- How to add new CSS file to new PHP file
- Some problems calling a function into sprintf() inside functions.php template file [closed]
- Problem in replacing the_content with the_excerpt()
- Integrate admin plugin into template. Very interesant (live search + autocomplete with wp rest api, in vanilla js)
- Display articles with a different template in the home page | Solved |
- Find and print first entry from WordPress post in custom excerpt?
- Converting Array to String Issue [closed]
- ACF – Custom image for Product Tags not displaying
- Polylang and template files
- Trying to modify content.php
- How to create dynamic templates?
- Change WooCommerce template for PDF – access to custom field
- How to include a function in a template with template tag
- What syntax is this? “{{post.price}}”
- How to trim content AND retain HTML?
- How do I modify the Previous and Next Page posts on blog pages to include “previous” and “next” before the links?
- Access methods in plugin template
- Archive page if else not working for post_excerpt and post_content
- Create dynamic content from one WP page to multiple other pages
- Problems With Query and/or Template Part and/or PHP
- why is this content-template not showing any of my blog-entries?
- PHP code rendered in HTML
- Odd page behaviour after removing sidebar
- get_permalink returning first letter
- How can I add more code to this?
- Custom Archive Page
- Merging two excerpt functions to work with conditions
- How to refresh a template page on WordPress in 3 seconds – easiest method?
- Excerpt all post content Content Same Size without word cutting off
- Twig+WordPress how to use array arguments inside a function?
- How to implement a custom sliding banner? [closed]
- Remove post image caption from post_excerpt();