Here is the solution that seemed to work. Thanks Tom
function new_excerpt_more($more) {
global $post;
$thePostID = $post->ID;
if($thePostID == 1128) {
return '...<a class="readmore" href="'. get_permalink($post->ID) . '">Watch Video »</a>';
} else {
return '...<a class="readmore" href="'. get_permalink($post->ID) . '">Read more »</a>';
}
}
add_filter('excerpt_more', 'new_excerpt_more');
Related Posts:
- opening links in new tab using – add_filter( ‘the_content’, ‘make_clickable’);
- Default or Preset Content for Custom Post Types
- How would go about if I just want a temporary function?
- How to filter out shortcode when displaying the_excerpt() in the loop?
- str_replace function in theme
- Insert image in WordPress with HTML5 tag and caption function
- Setting a default text for excerpts of a particular category
- login_headertitle is deprecated since version 5.2.0
- The_content and Preg_replace in loaded Iframe [closed]
- Problem with images URL after filter applying
- Save_post – Warning: Cannot modify header information
- Appending „read more” to the excerpt conditionally
- Hide disclaimer from summary excerpts
- Shortcode to eliminate and replace with
- child_of not working while searching
- Can’t change excerpt length and more tag
- function to show youtube videos within excerpt – if condition and apply_filters
- Issues with title-tag and document_title_parts
- When should you, and when should you not, use wp_list_pluck()?
- Change admin bar to default:off
- Woocommerce add to simple product attribute programmatically [closed]
- How to reduce original image quality on upload?
- Add body class of category parent
- When is wp_trim_excerpt() called?
- Convert hyphen to underscore in permalinks
- Programmatically Add Font-Awesome Icons to Category Widget
- Change comments form title on a page by page basis
- Remove bulk actions based on user role or capabilities
- Remove images from get_the_excerpt
- How to override filter in child theme?
- How to change a certain text or term of WordPress into a custom into the whole site?
- Adding body class when post contains a specific shortcode
- Custom excerpt legnths for specific pages
- How to get Custom Post ID by adding filter to child theme’s function
- Theme-Config tab in admin Pannel?
- How to Add a Random Custom Gravatar in the WordPress Comments?
- Manipulate Output of wp_list_something: select menu instead of li’s
- Show excerpt for only first post in query
- How to mass-delete inline styles in WordPress custom post type automatically?
- PHP files included in functions.php don’t seem to work
- How Can I Expand the WordPress Customize window without any Plugin?
- Set quantity of woocommerce product on page visit [closed]
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- How do I add Bootstrap and LESS to my migrated WordPress site?
- Passing values from a widget to a function within a plugin
- Publish/Update post is changing image links from file url to post url
- How can I remove the main description text box in a Woocommerce product editor page? I only use the “Product short description” text box [closed]
- Best practices regarding the creation of custom widgets?
- Custom Post excerpt not working correctly
- Replace a menu with widget or a custom template file programmatically
- new_excerpt_more link not working properly
- Run wp_kses_decode_entities on atom feed?
- Can’t filter wp_get_attachment_link
- Override the WordPress core function wp_referer_field
- Modify post filter to set custom number of posts per page and exclude child posts
- How to add_filter html template to middle of content
- How do I pull excerpts from pages?
- Combine embed_oembed_html and oembed_result
- Strip div From Excerpt
- Add attribute only to first image of every post via functions.php
- Native gallery custom html output
- How to change value of variable in theme file with functions.php WordPress?
- two search forms on the same page
- Insert a field with PREG_REPLACE – strange behaviour
- how to display a page before the home page
- Function to check if custom page is used by page?
- Any adverse effects of adding apply_filters to a function?
- How to remove font awesome from loading in wp theme
- Customizing the wp_video_shortcode output with add_filter
- Header menu aligned right on all pages except for single-post page [closed]
- Removing comment lines from all enqueued js files using a filter function
- How Do I Unhook This Parent Theme Function?
- Allow user only create specific tags
- Child theme remove parent filter in functions
- Shortcode to insert default text and change one word throughout it?
- How Can I Concatenate A String With One Of My Custom Field Value Before Saving The Post?
- add product thumbnail to checkout page only and include variation name
- WordPress Ajaxifying not working properly
- Remove External Links from WordPress posts Using add_filter() in Theme functions.php
- WordPress function with attribute pass to template
- Which method is more correct for removing WooCommerce Extensions menu item?
- Adding A New Widget to WordPress Disables the Existing Widgets
- Help! Need a different logo on my main page from my other pages
- Display page number on custom page title function
- Only seems to be displaying one child when there are supposed to be multiple
- How do I integrate my Child Theme into a Custom Template?
- previous_post_link inside of a function?
- Search and Replace Script Loader in Head Only Works in Footer
- custom post with loading script per single post
- Problem in outputting shortcode
- Check if excerpt is empty at loop-portfolio
- How to Add A Rel Filter to All Links?
- Allow tags and attributes in post and pages content
- Override parent theme function that is not hooked or in the functions.php file
- More link – not text
- How to add an excerpt and read more link to a page?
- How to Insert A List of Posts in A Category Written by the Author into the Author Archive
- Adding a filter to my posts
- Filter to strip unnecessary attributes
- Warning: call_user_func_array() expects parameter 1 to be a valid callback