Viewing 30 posts - 1 through 30 (of 30 total)
  • Author
    Posts
  • #3152

    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?

    #40847

    Hey,

    open up template_portfolio.php and search for:

    ('Read more','avisio')

    Change the “Read more” text as you like :)

    #40848

    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 ()?

    #40849

    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….

    #40850

    How can you change each read more button to point to a unique URL?

    #40851

    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.

    #40852

    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.

    #40853

    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.

    #40854

    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.

    #40855

    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.

    #40856

    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')

    #40857

    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/new

    I set up the custom field as follows for my portfolio item “milgard”;

    field name = url

    value = http://www.milgard.com

    When selecting the read more button it tries to find newwww.milgard.com

    How do I point it to the other website?

    #40858

    I figured out item #2, but can still use help on #1.

    Thanks again.

    #40859

    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

    #40860

    That did it.

    Thanks again for all the help. Much appreciated.

    #40861

    Glad that we could help you :)

    #40862

    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??

    #40863

    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{

    #40864

    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.

    #40865

    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]

    #40866

    Can you post the content of your portfolio template? Please use http://pastebin.com

    #40867
    #40868

    Ok- change:

    'display_link' => array($openImage),
    'linkurl' => array ('XL','_preview_big')

    to:

    'display_link' => 'permalink',
    'linkurl' => ''

    #40869

    okay, I did that but that actually removed the link altogether..can I link each image to a specific page

    #40870

    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.

    #40871

    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?

    #40872

    I tried to link the image itself manually, but that didn’t seem to work.

    #40873

    Can you create me an admin account and send me the login data to: (Email address hidden if logged out) – I’ll look into it.

    #40874

    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.

    #40875

    I didn’t receive the login data – I’ve searched the spam filter too but didn’t found it. Please send it again.

Viewing 30 posts - 1 through 30 (of 30 total)

The topic ‘Change Read More link in portfolio?’ is closed to new replies.