• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

AgentPress: customize "custom text" background for different categories

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › AgentPress: customize "custom text" background for different categories

This topic is: not resolved

Tagged: Agentpress, background, category, custom text

  • This topic has 2 replies, 2 voices, and was last updated 7 years, 10 months ago by DanielMT.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • April 27, 2015 at 2:54 am #149264
    DanielMT
    Participant

    Hi,

    In the demo website (http://demo.studiopress.com/agentpress/), in the featured listings, you can set different custom/featured text over the listings in background red color.

    In the demo, "new listing" or "Just Reduced!", for example.

    I'd like to know how can I change that background color for listings in different categories. For example, let's say I have a "sold" category and I want to differentiate the "sold" listings from the ones that are not.

    How can I do that? Any idea?

    An "easy" way would be to add a hook so in the listings (home page or search results) the "category"of the listing is included in the "<div>" tag, so I can change the CSS of that category.

    For example, this is the opening div in a listing in the homepage:

    <div class="post-1459 listing type-listing status-publish has-post-thumbnail left entry”>

    If there's a way to add the categories to the "class" section, it should be done!!

    Thanks everyone in advance.

    http://An "easy" way would be to add a hook so in the listings (home page or search results) the "category" is included in the "" tag, so I can change the CSS of that category. For example, this is the opening div in a listing in the homepage If there's a way to add the categories to the "class" section, it should be done!!
    May 10, 2015 at 9:30 am #151482
    SavvyJackie
    Member

    Hi,
    Yes, you would need to modify the plugin to output add a class name for the specific custom text. This file controls the output on the homepage.

    class-featured-listings-widget.php

    The only issue with that is if the plugin is updated, your code is overwritten.

    Another option, might be to use jQuery to check the contents of the span tag and add a class name based on that content.


    Web Designer and Developer at Savvy Jackie Designs | Lucky with plants | @SavvyJackie

    Got your question answered here? Please pay it forward by helping someone else. I’m sure there is at least one question you can answer. 🙂

    May 10, 2015 at 11:47 pm #151644
    DanielMT
    Participant

    Thanks @SavvyJackie

    I'll try editing the file you mentioned. I know the changes would be overwritten, but if there's not a way to create a hook in the functions.php, this could be a solution.

    Thanks again.

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble