• Resolved denialorcoped

    (@denialorcoped)


    On my classifieds listing page, I’d like to add a small button or a text link under the description of each ad that says something like “View full ad”. This would make it clearer to users that they can click through to view the complete ad details.

    Is there a way to add this type of button or link?

    Thanks in advance for your help!

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Greg Winiarski

    (@gwin)

    The only way to do that with blocks is to edit the wpadverts/blocks/list/templates/list-item.php template file, but i would not recommend doing it as these changes will be overwritten on WPAdverts update.

    Thread Starter denialorcoped

    (@denialorcoped)

    Greg, I used ChatGPT to help create this code which works:
    .wpa-result-meta–default__post_content::after {
    content: ‘Click to View Full AD’;
    display: block;
    font-weight: bold;
    padding-bottom: 10px;
    color: #333;
    }

    The only issue is that I also have this code which limits the desciption height and when this is added it doesn’t seem to work anymore:

    .wpa-result-meta–default__post_content {
    max-height: 100px; /* Limits description length / overflow: hidden; / Hides extra content */
    position: relative;
    }

    Perhaps you could advise on this???

    Thread Starter denialorcoped

    (@denialorcoped)

    Would something like this work???

    .wpa-result-meta–default__post_content::after {
    content: ‘View Full Ad’;
    position: absolute;
    bottom: 10px;
    right: 15px;
    font-weight:bold;
    color:#333;

    }

    .wpa-result-meta–default__post_content {
    max-height: 100px; /* Limits description length / overflow: hidden; / Hides extra content */

    }

    Plugin Author Greg Winiarski

    (@gwin)

    Hi,

    can you paste a link to the website so i can see how it looks like on-site? Hard to tell without it.

    Thread Starter denialorcoped

    (@denialorcoped)

    Plugin Author Greg Winiarski

    (@gwin)

    I am not sure, the website looks fine, i am toggling the overflow:hidden with browser developer console and the result is the same?

    Thread Starter denialorcoped

    (@denialorcoped)

    Yes, it looks like the extra code snippet I pasted right after fixed the issue for me. Thanks for checking though.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Add “View Full Ad” Button or Link’ is closed to new replies.