I want to change the text and link for read more button. I see similar posts but not for Avisio. Where do I change this?
Change Read More link in portfolio?
30 posts from 6 voices-
Posted 2 years ago #
-
Hey,
open up template_portfolio.php and search for:
('Read more','avisio')Change the "Read more" text as you like :)
Posted 2 years ago # -
Thanks. I did change that. But which aref do I change? I changed it to Buy Now and want to link every image button the the shop page. I see numerous links.... is it this one?
echo "".__('Buy Now','avisio')."";would i just put the page id in ()?
Posted 2 years ago # -
Hey,
no - if you want to change the link target replace following code in template_portfolio.php:
echo "<a href='".get_permalink()."' class='more-link'>".__('Read more','avisio')."</a>";with:
echo "<a href='http://my-website.com/shop-page' class='more-link'>".__('Read more','avisio')."</a>";Instead of "http://my-website.com/shop-page" insert your shop page permalink url....
Posted 2 years ago # -
How can you change each read more button to point to a unique URL?
Posted 2 years ago # -
Hey,
replace this code:
echo "<a href='".get_permalink()."'>".__('Read more','cleancut')."</a>";with:
if (get_post_meta($post->ID, 'url', true)){ echo "<a href='".get_post_meta($post->ID, 'url', true)."'>".__('Read more','cleancut')."</a>"; }else{ echo "<a href='".get_permalink()."'>".__('Read more','cleancut')."</a>"; }Afterwards you can set post meta fields to use external urls for the read more button. Call the fields "url" and type in the websites' adresses as values.
Posted 2 years ago # -
I am actually using Cleancut, so I am assuming the code reference is the same?
Also, I have no idea how and where to set a post meta field.
Thanks.
Posted 2 years ago # -
Hey,
yes - it's the same code - I updated the code above though.Have a look at this tutorial: http://www.kriesi.at/archives/how-to-use-wordpress-custom-fields - it shows you how to use custom fields.
Posted 2 years ago # -
Dude,
I can't seem to find where the "advanced options tab" is located in order to access the custom fields tab. I don't see that option anywhere on the dashboard when I am in the page that would edit the specific portfolio entry.
Can you point me in the right direction?
As always, much appreciated.
Posted 2 years ago # -
I don't seem to have the custom fields section in my wordpress. I watched videos on youtube that showed where it should be located but it doesn't exist on my wordpress dashboard pages. Any ideas on what I can do to add it? I can't find any help elsewhere.
Thanks.
Posted 2 years ago # -
Hey,
for portfolio entries you must activate the "custom fields" manually. Open up portfolio.php and search for:
'supports' => array('title','thumbnail','excerpt','editor','comments')Replace it with:
'supports' => array('title','thumbnail','excerpt','editor','comments','custom-fields')Posted 2 years ago # -
Thanks, I have two problems.
1. The color for the "read more" button has disappeared. It seems to be formatted like a hypertext link.
2. When selecting the read more link of the portfolio entry with the custom field I get a 404 error.
My website is in a test folder within my domain while I develope to keep the current site live.
Current site = http://www.lunstrumwindows.com
New site = http://www.lunstrumwindows.com/newI set up the custom field as follows for my portfolio item "milgard";
field name = url
value = http://www.milgard.comWhen selecting the read more button it tries to find \new\www.milgard.com
How do I point it to the other website?
Posted 2 years ago # -
I figured out item #2, but can still use help on #1.
Thanks again.
Posted 2 years ago # -
Hey,
It looks like the more-link class has been removed - if the code you're using is now this:
if (get_post_meta($post->ID, 'url', true)){ echo "<a href='".get_post_meta($post->ID, 'url', true)."'>".__('Read more','cleancut')."</a>"; }else{ echo "<a href='".get_permalink()."'>".__('Read more','cleancut')."</a>"; }change it to:
if (get_post_meta($post->ID, 'url', true)){ echo "<a class='more-link' href='".get_post_meta($post->ID, 'url', true)."'>".__('Read more','cleancut')."</a>"; }else{ echo "<a class='more-link' href='".get_permalink()."'>".__('Read more','cleancut')."</a>"; }If it's not this, what have you changed it to?
James
Posted 2 years ago # -
That did it.
Thanks again for all the help. Much appreciated.
Posted 2 years ago # -
Glad that we could help you :)
Posted 2 years ago # -
I have tried to follow along with this but whenever I put that code into the template_portfolio.php and then try to load my page, I get this error message: Parse error: syntax error, unexpected T_ENDWHILE in /home/cmaprom/public_html/dev/altd/wp-content/themes/cleancut/template_portfolio.php on line 158
Not sure what I did wrong??
Posted 1 year ago # -
Something in this piece of code is causing the error:
if (get_post_meta($post->ID, 'url', true)){
echo "ID, 'url', true)."'>".__('Read more','cleancut')."";
}else{Posted 1 year ago # -
Hey nugent44,
Could you formulate what you were trying to do when the error manifested? This topic is quite long and it's easy to make an error.
Posted 1 year ago # -
I have successfully linked the Read More Buttons in my portfolio to various pages using custom fields. With the above code, I was trying to link the images themselves to those pages. [I'm using Cleancut btw, but this was the most helpful thread I found so far]
Posted 1 year ago # -
Can you post the content of your portfolio template? Please use http://pastebin.com
Posted 1 year ago # -
Posted 1 year ago #
-
Ok- change:
'display_link' => array($openImage), 'linkurl' => array ('XL','_preview_big')to:
'display_link' => 'permalink', 'linkurl' => ''Posted 1 year ago # -
okay, I did that but that actually removed the link altogether..can I link each image to a specific page
Posted 1 year ago # -
Sorry - while I investigated the bug in my code I noticed that CleanCut offers this option out of the box. Go to CleanCut Options > Portfolio Options and set "When clicking on a Portfolio Image what should happen?" to "Show Portfolio Single Post". Please revert the changes I posted above.
Posted 1 year ago # -
Hey thanks- the image is linking now, however, I was hoping to be able to specify where the images link- as I really need it to link to another portfolio page or a specific page. Any suggestions?
Posted 1 year ago # -
I tried to link the image itself manually, but that didn't seem to work.
Posted 1 year ago # -
Can you create me an admin account and send me the login data to: kriesi2000-dude@yahoo.com - I'll look into it.
Posted 1 year ago # -
Hey we sent the account info to the email you listed. Let us know if it works okay! We really appreciate your help.
We're just hoping each portfolio image can link to the same page as its respective read more button.Posted 1 year ago # -
I didn't receive the login data - I've searched the spam filter too but didn't found it. Please send it again.
Posted 1 year ago #
Reply
You must log in to post.














