Customizing the 'read more' link in Wordpress - wordpress

Im trying to work on this site and I need to change the link in the "read more" button to another page (See picture, red circle).
How do I customize the destination of the "read more" link? This isn't an excerpt function, it is a clickable link that leads to a whole other page.

This will add a link in a div after the excerpt. Hide the initial read more link and that should work. Although the read more link really was intended only to link to the full article.
function add_excerpt_link($more) {
global $post;
return 'Custom Link;';
}
add_filter('excerpt_more', 'add_excerpt_link');

Related

Remove "Open link in a new window/tab" checkbox in Post link visual editor

I'm building a Wordpress site for a group of authors and have set it up to universally display internal links in the same tab while displaying external links in a new tab.
Unfortunately, the "Open link in a new window/tab" checkbox that appears in the link pop-up in the visual editor is causing them to freak out.
Does anyone know where this pop-up window is located and the best way I can filter this to remove that line and checkbox altogether?
You can add this function to your functions.php file. It will add a style to the admin area that hides the "link target" div:
function hide_link_target() {
echo '<style>
.link-target {display:none;}
</style>';
}
add_action('admin_head', 'hide_link_target');

Woocommerce add click to enlarge under featured image

I'm using Woocomerce (Wootique) and I'd like to add "Click To Enlarge Image" beneath the featured image on single product page. Text should show beneath image and above the description/reviews tabs.
Can't figure it out? Any ideas?
http://www.forgottentreasurez.us/product/hand-signed-limited-edition-serigraph-mazal-tov-love/
Thank you in advance
There’s an action that you can use to add content below featured images, which can be used before or after product thumbnails. The woocommerce_product_thumbnail action is what will help us out. Let’s add a notice that says, “Click to Enlarge” below the featured image.
We’ll use a function to insert this text as a heading below the featured image. You can add this to your child theme or, even better, a code snippet using the Code Snippet plugin.
function skyverge_add_below_featured_image() {
echo '<h4 style="text-align:center;margin-top:10px;">Click to Enlarge</h4>';
}
add_action( 'woocommerce_product_thumbnails' , 'skyverge_add_below_featured_image', 9 );

in Wordpress: Adding a Manual exceprt hides the "show more" link in index page

My site displays excerpts automatically just fine, But I want to add some other text in the excerpt of my post, I go to screen options -> check excerpt, and then in the excerpt window below the screen editor i type whatever i want.
However the problem is that after i save, the "read more" link in the main page disappears.
How can i edit the excerpt manually and still keep the "read more" link visible?
I have tried searching for the issue but couldn't find anything useful.
Add this to your functions.php
function new_excerpt_more($more) {
global $post;
return '… ' . 'Read More »' . '';
}
add_filter('excerpt_more', 'new_excerpt_more');
Here you are telling WordPress to remove the default more which looks like this: [...], and replace it with a link.

Add Link On Specific Tag Post Wordpress

I'm trying to add a text link to a specific "tag" post in Wordpress - click here - http://bit.ly/x9SfIG - I'm trying to add the link just below the "tag" title Drake. So the text would only be on this "tag" post - no others...I know I have to create a function...Any help would be amazing. Thanks.
Here ya go sir:
<?php if(has_tag( 'drake' )) {
echo ('Link Title');
} ?>
This function checks to see if the post has the tag 'drake', and if it does, it'll show any link you specify in the above code. Just place it in your single.php file wherever you want the link to show.

Wordpress Plugin Shortcode Disturbs Page Content Put Alongwith it into the Editor

I have created a plugin with short code now when I access the plugin through short code it works fine issue is that when I put some text above the short code that text goes below the plugin when i view the page.
Here is code that I put into wordpress editor:
<p>Unlock your device safely in 3 steps</p>
[CUSTOMSLIDER]
you can see the plugin shortcode is on second row but static text is on first row but when I will view the page the text goes below the plugin. here you can see its view. you can see the slider is at top and the text is below slider though these were opposite in original source.
in your custom plugin, instead of:
echo "content";
change that to:
$variable .= "content";
return $variable
from:
http://wordpress.org/support/topic/shortcode-moving-to-top-of-entry-content

Resources