Viewing 28 posts - 1 through 28 (of 28 total)
  • Author
    Posts
  • #888392

    Hello Guys,

    iam using the great Enfold Theme and have two important questions to make my Website more proffessional.

    1. On my front Page iam using the Blogpost style or Builder and have changed the read more Link to a Button, which is called “Jetzt zum Angebot”. This button i want to use, when i have a good Deal on my Site. But i have articels with only informations and so the Button wich ist called ” Jetzt zum Angebot” make no sins. When i have articles with information the Button have to show another text like “jetzt zum Ratgeber” or “jetzt zum Artikel”.
    Is it possible to change this read more link individual, so that it makes sin for my users?

    2. Iam using the excerpts as you can see on my homepage. The read more Button is attached to the lengh of the excerpts, so that he ist not on the same level, like an other read more button. (You can see it on my frontpage).
    Is there a Code or something, that can make the button fix, so that a diffrent lenght of the excerpts is not important any more? Maybe a breakline Code beetween excerpts and read more button/link?

    I hope you understand my Questions. I do not speak english so much.
    In the private Content, i will fill in the Homepage url and than you will see what i mean.

    Thanks for your time!

    Nice regards
    Steps 3011

    #889966

    Hey steps3011,

    Thank ypu for using our theme.

    To change the read more text you can use filters and you find the necessary info at
    https://codex.wordpress.org/Customizing_the_Read_More

    Check, if this helps you.

    Best regards,
    Günter

    #892491

    Hey Günter,
    sorry for my late answer and a happy new Year.

    I didn`t get it, because i use the excerpts and i have already changed the read more button and just need an individual Text for different type of posts. Is it possible to do this, when im using the excerpts or is it just possible with the read more tag to make it individual? Iam sorry, but i didn’t understand how to do it, even when im reading the information in the link you sent me in your answer.

    I have a other question which is very important to me.

    On my homepage http://www.technikolymp.de i’m using the blog grid layout with 3 columns. I have different articels on my website with hot deals and articels with only informations. Is it possible to change the sizes of the images in this blog layout? Example:

    3 Images are 450 x 400 in a three column grid with blog layout. Now i release a new information article and the image should be the same size as the three images below. Like its just one grid. And above this article there are 3 images with 450 x 400 px. Is this possible with the blog layout?

    I hope that you understand my question, because my english isn’t very good.

    Nice Greeds

    Steps3011

    #893080

    Hi,

    1.) What do you mean by “an individual Text for different type of posts”? Would you like to define the excerpt manually? Please edit the the post then enable the Excerpt module from the Screen Options panel.

    2.) Are you using the Blog Posts element? You can set the “Preview Image Size” settings to manual or the second option and then define the thumbnail size.

    Best regards,
    Ismael

    #894112

    Hello Ismael,
    I have an example for you, in this page there is a difference between a Deal and a practical adviser tile. The Buttons have different designations. And also the Size of the tiles are different. How can i manage it like this on my site?

    1. Different designations of the Read more Buttons.
    2. Different Sizes of The tiles/ Images for diffent Type of Categories in my Website (deals vs. Practical Adviser)

    Best regards
    Steps3011

    #894453

    Hi steps3011,

    Unfortunately, it would require quite some time and customization of the theme to achieve this, so I am sorry to tell you that this is not covered by our support. However, if it’s really important for you to get this done, you can always hire a freelancer to do the job for you :)

    Best regards,
    Victoria

    #896174

    Hey Victoria,
    1.Different designations of the Read more Buttons

    On another topic from another user i saw this:
    https://kriesi.at/support/topic/customize-read-more-buttons/

    Is it possible to do this in this way? I tried, but i failed, because i didnt find the row in my archive.php. So it didnt works.

    2. Different Sizes of The tiles/ Images for diffent Type of Categories in my Website (deals vs. Practical Adviser)

    I thought there is a code or something in the index oder function.php, thats breaks the pattern of the blog layout on the frontpage, like:

    if post id:14, make image size on frontpage 1200 x 400 px.

    Best regards
    Steps 3011

    #896788

    Hi,

    Are “deal” and “practical adviser” categories?

    I’m sorry but I’m having a little bit of difficulty understanding the request. If you don’t mind, we would like to see a screenshot or a mockup of the layout that you have in mind so that we can understand it better. You can use imgur or dropbox.

    1.) You can find the read more markup in the loop-index.php file.

    	$current_post['content'] 	= $blog_content == "content" ? get_the_content(__('Read more','avia_framework').'<span class="more-link-arrow"></span>') : get_the_excerpt();
    	$current_post['content'] 	= $blog_content == "excerpt_read_more" ? $current_post['content'].'
    <div class="read-more-link"><a href="'.get_permalink().'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"></span></a></div>
    ' : $current_post['content'];
    	$current_post['before_content'] = "";
    

    If “deal” and “pracitcal adviser” are categories, you can use the has_category conditional function to alter the text of the read more button based on the current post category.

    // https://codex.wordpress.org/Function_Reference/has_category

    2.) Unfortunately, this feature will require major modification on the the theme. Please hire a freelance developer as previously suggested.

    Best regards,
    Ismael

    #897688

    Hey Guys,

    In the link below you can see a picture with two different articles from two different categories, but the same label of the Read more button “Now for sale”. On the left is a so-called deal from the category “consumer electronics”. On the right side you can see an article from the category “Technik-Magazin” and also there the “read more button” is labeled with “Now for sale”. And I would like to have all articles from the categories “Technology Magazine and Lexicon” labeled “Continue to Article” and not “Now for sale”.

    I tried using the custom fields with WordPress, but it did not work.

    View post on imgur.com

    Best Regards

    Steps 3011

    #897811

    Hi,

    Thank you for the info. Please try the suggestion above. Use the “has_category” function to define a different read more text for each category.

    Best regards,
    Ismael

    #898152

    Hello,

    I looked at the link with has_category, but I do not understand it. Could you possibly give an example for my category: Encyclopedia?
    In which file do I write something to use a text for each category?
    I think so, then I grab that too.

    Best regards
    Steps3011

    #898324

    Hi,

    You can try the following modifications.

    if( has_category('name-of-category-here') ) {
    	$readmore = __('New read more text','avia_framework');
    } 
    elseif ( has_category('another-name-of-category') ) {
    	$readmore = __('Another read more text','avia_framework');
    } 
    else {
    	$readmore = __('Read more','avia_framework');
    }
    
    $current_post['content'] 	= $blog_content == "content" ? get_the_content($readmore.'<span class="more-link-arrow"></span>') : get_the_excerpt();
    $current_post['content'] 	= $blog_content == "excerpt_read_more" ? $current_post['content'].'
    <div class="read-more-link"><a href="'.get_permalink().'" class="more-link">'.$readmore.'<span class="more-link-arrow"></span></a></div>
    ' : $current_post['content'];
    $current_post['before_content'] = "";

    Adjust the values of the has_category function and the designated readmore text.

    Best regards,
    Ismael

    #898508

    Hello,

    thank you for the Code. I just have to know in wich template i have to put this code. In the Function or the Category-template?
    I put the code in the category-template, but it diddnt takes an effect. I send you the image in the private content.

    Thanks

    With Best Regards
    Steps3011

    • This reply was modified 1 year, 7 months ago by  steps3011.
    #899946

    Hi,

    The code is located in the includes > loop-index.php file. Please review our previous response.

    // https://kriesi.at/support/topic/individual-read-more-button/#post-896788

    Best regards,
    Ismael

    #900452

    Hello,
    I have now tried a little and found out, that he translates the code as soon as I choose blog layout settings: use advance layout … Then he takes over the code and changes the read more text in the name i have chosen for the categorys. (Thanks for the code)

    Unfortunately, this is not true for the grid layout and not for the home page.

    Do you have a suggestion as he also on the start page and the selected categories in the grid layout takes over?

    • This reply was modified 1 year, 7 months ago by  steps3011.
    #900546

    Hi,

    Thank you for the update.

    For the grid layout, you will have to modify the config-templatebuilder > avia-shortcodes > postslider.php file. Look for this code around line 451.

    $permalink = '
    <div class="read-more-link"><a href="'.get_permalink($the_id).'" class="more-link">'.__('Read more','avia_framework').'<span class="more-link-arrow"></span></a></div>
    ';
    

    You can do the same modification.

    if( has_category('name-of-category-here') ) {
    	$readmore = __('New read more text','avia_framework');
    } 
    elseif ( has_category('another-name-of-category') ) {
    	$readmore = __('Another read more text','avia_framework');
    } 
    else {
    	$readmore = __('Read more','avia_framework');
    }
    
    $permalink = '
    <div class="read-more-link"><a href="'.get_permalink($the_id).'" class="more-link">'.$readmore.'<span class="more-link-arrow"></span></a></div>
    ';

    Best regards,
    Ismael

    #900729

    Hello Ismael,

    that worked with the code for the grid layout. (Thanks a lot)
    Now there is only one more thing that does not work.

    Unfortunately, he does not use this if has_category function for the start page to differentiate the categories. There I will continue to see the same read more texts for each category. That’s the only thing missing, then it would be done.

    Is there a folder where can I apply the homepage as well? That would be exactly how it should be in the end.

    Best regards

    Steps3011

    #901163

    Hi,

    Please post the login details in the private field so that we can check the page. Is that a content slider?

    Best regards,
    Ismael

    #901348

    Hello,

    So I use on the start page, the grid layout with 3 columns and as an ad the blog posts. I’m not sure what you meant with content slider. I’ll send you my access data in the private field.

    Thanks for your help.

    Best regards

    Steps 3011

    #901847

    Hi,

    Unfortunately, he does not use this if has_category function for the start page to differentiate the categories. There I will continue to see the same read more texts for each category. That’s the only thing missing, then it would be done.

    The same postslider.php modification should work in the home page because it’s using the blog posts element or the grid layout. Did you add more has_category conditional function? Please enable the Appearance > Editor panel so that we can check the modification.

    Best regards,
    Ismael

    #902095

    Hello Ismael,

    I have activated the editor in the theme so you can check it.

    I still have the Has_category function in the category-template.php packed. Have it just taken out just to see if something changes, but unfortunately unsuccessful. The function is now in the folder again, even if it does not have to be there.

    Many thanks for the help

    Best regards

    Steps 3011

    #902575

    Hi,

    We modified the code inside the postslider.php file.

    if( has_category(array('technikmagazin', 'haushaltsgeraete', 'unterhaltungselektronik', 'lexikon')) ) {
    	$readmore = __('Weiter zum Artikel','avia_framework');
    } 
    else {
    	$readmore = __('Read more','avia_framework');
    }
    

    Add more category slug or name inside the has_category array if necessary.

    Best regards,
    Ismael

    #902780

    Hello Ismael,

    unfortunately he still does not realize the difference between the categories on the start page. There is still always the same read more text displayed, no matter which category it is.

    I still found the has_category in the loop-index and tried to insert it in the loop page. Unfortunately without effect. I’ll send you a picture maybe you can do something with it from the looppage.php

    Hello Ishmael,

    unfortunately he still does not realize the difference between the categories on the start page. There is still always the same read more text displayed, no matter which category it is.

    I still found the has_category in the loop-index and tried to insert it in the loop page. Unfortunately without effect. I’ll send you a picture maybe you can do something with it from the looppage.php

    I’ve thought that through this 2 x $ readmore things that maybe can not distinguish and always takes only one read more text on the start page.

    Best regards

    Steps3011

    #903328

    Hi,

    Which categories should have a different “read more” text? Did you define additional categories in the array?

    if( has_category(array('technikmagazin', 'haushaltsgeraete', 'unterhaltungselektronik', 'lexikon')) ) {
    

    Best regards,
    Ismael

    #903394

    Hey Ismael,

    the categories technical magazine and encyclopedia should have another read more text. I have also included this in the code, but the changes are indeed in the categories, but not on the home page.

    if( has_category(array(‘technikmagazin’, ‘lexikon’)) ) {

    Best regards

    Steps3011

    #904017

    Hi,

    Thank you for the info. We added the post id paramter of the has_category function. It should be working properly now.

    Best regards,
    Ismael

    #1030895

    Hello Guys,

    Yesterday i updated my enfold theme and now i have the problem, that the” has catetegory function” do not work on my homepage. I will copy you the last 2 messages from me and from ismael, he fixed the problem month ago.

    Me: Hey Ismael,

    the categories technical magazine and encyclopedia should have another read more text. I have also included this in the code, but the changes are indeed in the categories, but not on the home page.

    if( has_category(array(‘technikmagazin’, ‘lexikon’)) ) {

    Ismael:
    Hi,

    Thank you for the info. We added the post id paramter of the has_category function. It should be working properly now.

    And than it worked. But since i updated the theme yesterday the function works not on the Frontpage (Homepage).

    Please, cann you help me, that the function even works on the homepage again.

    With best regards

    Steps3011

    #1032425

    Hi,

    Did you modify the categories? Please open a new thread with the site url and the link to the actual page with the issue.

    Best regards,
    Ismael

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

The topic ‘Individual Read more Button’ is closed to new replies.