Title: Custom Style
Last modified: August 22, 2016

---

# Custom Style

 *  Resolved [dmweyer](https://wordpress.org/support/users/dmweyer/)
 * (@dmweyer)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-style-2/)
 * Hi There,
 * I am trying to change the style of the link heading. I have created a user-get-
   posts-style.css style sheet and added tpg-title-class to this style sheet. The
   link to the post still seems to inherit the style from the main theme i.e. changing
   the tpg-title-class style makes no changes to the title link. Have a look at 
   balancedenergy.co.za links on the right hand side under latest news.
 * [https://wordpress.org/plugins/tpg-get-posts/](https://wordpress.org/plugins/tpg-get-posts/)
 * o and this is the short code I have used in the widget: [tpg_get_posts fields
   =”title,meta”
    field_classes=”post_title=tpg-title-class” posts_per_page=1]
 * The heading for the post link is enclosed by H2 tags

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

 *  Thread Starter [dmweyer](https://wordpress.org/support/users/dmweyer/)
 * (@dmweyer)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-style-2/#post-5480886)
 * This seemed to work, although it doesn’t make it clear how to exclude the h2 
   tags…. this isn’t really a solution though
 * I added title_tag=”p”
 *  Plugin Author [Criss Swaim](https://wordpress.org/support/users/cswaim/)
 * (@cswaim)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-style-2/#post-5481001)
 * To change the link you need to reference the `<a>` under the `<h2>`. something
   like this `.tpg-title-class h2 a { your styling here}`. Please verify the syntax,
   but that is the general idea.
 * hope that helps.
 *  Thread Starter [dmweyer](https://wordpress.org/support/users/dmweyer/)
 * (@dmweyer)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/custom-style-2/#post-5481098)
 * Thanks cswaim,
 * I tried what you suggested, my css knowledge isnt that good. Does this look correct:
   .
   tpg-title-class h2, .tpg-title-class a { style here }

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

The topic ‘Custom Style’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/tpg-get-posts_dfefe0.svg)
 * [TPG Get Posts](https://wordpress.org/plugins/tpg-get-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tpg-get-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tpg-get-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/tpg-get-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tpg-get-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tpg-get-posts/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [dmweyer](https://wordpress.org/support/users/dmweyer/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/custom-style-2/#post-5481098)
 * Status: resolved