I'm using blogstart wordpress theme and I would like to change "Read more" text to something similar to language than I'm using. How can I do that? I already tried to paste code below to functions.php. Replaces the excerpt "Read More" text by a link function modify_read_more_link() { return '<a class="read-article" href="' . get_permalink() . '">Your Read More Link Text</a>'; } add_filter( 'the_content_more_link', 'modify_read_more_link' ); // Replaces the excerpt "Read More" text by a link function new_excerpt_more($more) { global $post; …
I have a site that displays manual excerpts on the blog post page: https://teralynnchilds.com/blog. I added a custom read more link using the snippet found here: https://wpmayor.com/add-read-link-manual-excerpts/ The RSS feed (https://teralynnchilds.com/feed) includes the manual excerpt, the custom read more link, AND a default read more link of "keep reading TITLE at SITE". I am trying to remove that default read more link from the feed but cannot find the source anywhere. How do I fix it some my feed only …
I am not satisfied with the read more text in Twenty Fifteen (I am using the French translation). In English it says "Continue reading", and in French it is very similar, but it didn't work well with the title replacement in the string, so I tried to change it to not display the title at all, and instead be a static phrase like "Read more". I tried to modify "/www/wp-content/languages/themes/twentyfifteen-fr_FR.po", line 285, however since then it stopped translating the text …
I have a piece of code that extracts the first paragraph from the post, enclosed in a p tag. I want to add a "Read more" link inside the p tag referring to "the full post". Please help. function first_paragraph() { global $post, $posts; $first_para = ''; ob_start(); ob_end_clean(); $post_content = $post->post_content; $post_content = apply_filters('the_content', $post_content); $output = preg_match_all('%(<p[^>]*>.*?</p>)%i', $post_content, $matches); $first_para = $matches [1] [0]; echo $first_para; }
I wanted to hide part of the content written after the "Read more" block added using Gutenberg editor. So I used this one https://gogutenberg.com/blocks/more/ But on the single post page, it shows full content and does not hide the part after the "Read more" block. Is it default behavior or I need to do some extra steps?
Crossposted from my topic on wordpress.org forum since I don't seem to be getting any bites Hi there! I’m fairly new to WordPress, my website is https://slasheethecow.com and I’m trying to be a smartarse but there’s a certain post I can’t get to show a “Continue reading” link on the home page for a post, this post to be specific. Originally the post was just a couple of paragraphs of text, then a more block, then an image, and I …
I need to be able to hide/show arbitrary content (paragraphs, lists, maybe pictures) based on a user clicking a link. This is easy enough, but I am running into a lot of problems trying to add this in the middle of a paragraph. We're trying to have a "read more" type link on certain sections of the page. It needs to be able to start anywhere in a paragraph of text. I tried this with a <span> tag but it …
I’m pulling my hair out. I have searched and searched for a way to remove the “Read More” link from my posts (full post, not excerpt). I’ve tried to add the filter below (and other pieces of code in functions.php) promoted in a number of places on the web. The filter works to turn the excerpt into a full-content post, but the same filter is also supposed to set the Read More text to null. Here’s what I’m using. /** …
I know how to use read more technique to only view an excerpt of the topic on the homepage and click on the read more icon to open the post and view the full content. Can we do it on the post itself? When the visitor open the post page itself (not the homepage), only an excerpt is available and they should click on "read more" to view the full content.
Here is the excerpt of the post on my home page. I want to end the excerpt with a sentence. In this case it is ' opportunities. '. I know how to modify the length but it won't do what i want. Here is excerpt from other website. Here you see excerpt ending with a proper sentence unlike the above which ends with the first word of next sentence 'Proactively'. After Implementing the solution by G.M. :-
the following is working good, but it breaks down if you activate wpml, do you have any idea how to surpass that? function ad_filter_menu($sorted_menu_objects, $args) { if ($args->menu != 32) return $sorted_menu_objects; foreach ($sorted_menu_objects as $menu_object) { // searching for menu items linking to posts or pages // can add as many post types to the array if (in_array($menu_object->object, array('post', 'page', 'um_page'))) { // set the title to the post_thumbnail if available // thumbnail size is the second parameter of …
When I put a Read More block, and my post link for instance is http://admin.com/jobs, by clicking on Read More, it will go to http://admin.com/jobs/#more-63. 63 is the post id. How can I prevent this behavior? I don't want it to append #more-{pid} to the post link
I am trying to display the readmore link in a specific part of my excerpt. The posts are created in a custom plugin, and I write custom HTML as the post_excerpt. However I want to display a readmore button in the excerpt, without having it at the very end outside all the containers I've made, as I need it to be at a specific location in the HTML DOM to be able to style it. This is the solution I …
Let's consider this code: add_filter('the_title', static function ($title) { return $title. '-boom'; }); Works fine, and adds '-boom' near all the titles. But, I also noticed that in some themes (Twenty Twenty, Twenty One and most likely many others) if a post contains the <!--more--> tag, this also affect the "continue reading" button, see image attached As you can see the span class "screen reader text" is also affected. Since I want to add some html close to the_title, this …
I'm pretty new to wordpress, I'm making an API call so it returns a certain number of posts with the same category, the meta fields and thumbnails. How can I return only the content before the READ MORE? I read that I can use the get_extended function but I can't figure out for the life of me where to put it. Here's the code at the moment: register_rest_route('mypage', 'recipes/(?P<quantity>[0-9]+)', array( 'methods' => WP_REST_Server::READABLE, 'callback' => function($request) { $post_type = 'recipe'; …
I have a theme for my mobile site that requires the <!--more--> tag in my posts for it to display an excerpt of my post's content. I've got over 2000 posts already, and its going to take forever to add the tag in all my posts. I don't want to use a plugin, cause I've used one that wasn't stable at all. I just need a snippet I can hook up in my theme's files that will add the more …
I am using this code in functions.php to so it will show on the front of my site and show the read more, but the read more is not showing, your help would be appreciated. function new_excerpt_more( $more ) { return ' <a href="'. get_permalink( get_the_ID() ) . ' ' . __('<br/><br/> Read More') . '</a>'; } add_filter( 'excerpt_more', 'new_excerpt_more'); Here is my site demo link: http://visionedc.com/2015/news
I am using the Siren Template. In homepage.php this code is used to display the portfolio content print_excerpt(200); But I to need show the content only before <!--more--> I have used this: the_content( $more_link_text, FALSE); but it is not working. It shows all the content
I'm using the following code (found on the WordPress.org site) to modify my (more…) text: //Modify "read more" text function modify_read_more_link() { return '<a class="more-link" href="' . get_permalink() . '">(Continue…)</a>'; } add_filter( 'the_content_more_link', 'modify_read_more_link' ); The code works as expected, in the sense that (more…) is properly replaced by (Continue…), and the link works as intended. However, there is a peculiar issue: The class more-link has disappeared, which means styling doesn't work. I attempted to circumnavigate the issue by adding …
I'm trying to feed posts in my blog page with a WP bakery widget. I have 8 posts published, but when I hit load more button it loads first 3 posts instead of those in the end. Attaching screenshots, also I'm not sure what else info do I need to share, so please tell me if some additional details needed.