Title: Add class to posts_morelink
Last modified: February 16, 2018

---

# Add class to posts_morelink

 *  Resolved [wputler](https://wordpress.org/support/users/wputler/)
 * (@wputler)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/add-class-to-posts_morelink/)
 * I have been using List Category Posts for a while and have used template files
   many times. I am attempting to add a class to the More Link:
 * `$lcp_display_output .= $this->get_posts_morelink($post, 'morelink');`
 * I reviewed your code and it looks like it should be able to accept a class, but
   it’s not coming through. (I did a var_dump on $this in the private function get_posts_morelink(
   $single) and it’s not showing up there.
 * I’m not sure where you process the incoming parameters.
 * If you look at the expanding box under Autism Evaluations, you’ll see it picks
   up the class for content, but not for the more link.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fadd-class-to-posts_morelink%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

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

 *  Thread Starter [wputler](https://wordpress.org/support/users/wputler/)
 * (@wputler)
 * [8 years, 3 months ago](https://wordpress.org/support/topic/add-class-to-posts_morelink/#post-9980354)
 * Part of the var_dump:
 *     ```
       [show_protected] => no
                           [class] => lcp_catlist
                           [conditional_title] => 
                           [conditional_title_tag] => 
                           [conditional_title_class] => 
                           [customfield_name] => 
                           [customfield_value] => 
                           [customfield_display] => 
                           [customfield_display_glue] => 
                           [customfield_display_name] => 
                           [customfield_display_name_glue] =>  : 
                           [customfield_display_separately] => no
                           [customfield_orderby] => 
                           [customfield_tag] => 
                           [customfield_class] => 
                           [taxonomy] => 
                           [taxonomies_and] => 
                           [taxonomies_or] => 
                           [terms] => 
                           [categorypage] => 
                           [category_count] => 
                           [category_description] => no
                           [morelink] => 
                           [morelink_class] => 
                           [morelink_tag] => 
                           [posts_morelink] => learn more
                           [posts_morelink_class] => 
                           [year] => 
                           [monthnum] => 
                           [search] => 
                           [link_target] => 
                           [pagination] => 
                           [pagination_next] => >>
                           [pagination_prev] => <<
                           [no_posts_text] => 
                           [instance] => 0
                           [no_post_titles] => no
       ```
   
 *  Plugin Contributor [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * (@zymeth25)
 * [8 years, 2 months ago](https://wordpress.org/support/topic/add-class-to-posts_morelink/#post-9983814)
 * Hi [@wputler](https://wordpress.org/support/users/wputler/)
 * The `get_posts_morelink` function doesn’t accept tags and classes as arguments.
   This is a knows issue. Until it gets fixed you have to use `posts_morelink_class`
   in your shortcode, it will produce the result you want.

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

The topic ‘Add class to posts_morelink’ is closed to new replies.

 * ![](https://ps.w.org/list-category-posts/assets/icon-256x256.png?rev=2517221)
 * [List category posts](https://wordpress.org/plugins/list-category-posts/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/list-category-posts/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/list-category-posts/)
 * [Active Topics](https://wordpress.org/support/plugin/list-category-posts/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/list-category-posts/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/list-category-posts/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [zymeth25](https://wordpress.org/support/users/zymeth25/)
 * Last activity: [8 years, 2 months ago](https://wordpress.org/support/topic/add-class-to-posts_morelink/#post-9983814)
 * Status: resolved