WordPress.org

Forums

List category posts
Remove Post title link? (5 posts)

  1. ottomek
    Member
    Posted 3 years ago #

    Is there a shortcode to remove the Post title link? I just want the post titles and contents to be displayed on a page without a link to the original post.

    thanks,

    http://wordpress.org/extend/plugins/list-category-posts/

  2. chezluc
    Member
    Posted 3 years ago #

    Hey ottomek,
    I had the same question and figured it out.
    I'm using the template feature, because I would like a different order for how the information is displayed. Inside of the template file their is this function:

    $lcp_display_output .= $this->get_post_title($single);

    What I did was go to the CatListDisplayer.php file inside of the folder plugins/list-category-posts/include/

    and created a new function, based off of the original one.
    The original is:

    private function get_post_title($single, $tag = null, $css_class = null){
            $info = '<a href="' . get_permalink($single->ID).'" >' . $single->post_title . '</a>';
            return $this->assign_style($info, $tag, $css_class);
        }

    I copied it and deleted the reference to the href, and renamed it, leaving the original.

    private function get_mypost_title($single, $tag = null, $css_class = null){
            $info = $single->post_title;
            return $this->assign_style($info, $tag, $css_class);
        }

    then, inside my template file, I changed the code to:

    $lcp_display_output .= $this->get_mypost_title($single);

    hope that helps!

  3. 1seoinfo
    Member
    Posted 2 years ago #

    Or, for people like me:

    private function get_post_title($single, $tag = null, $css_class = null){
    				$info = $single->post_title;
    				return $this->assign_style($info, $tag, $css_class);
    		}
  4. jaydokie
    Member
    Posted 2 years ago #

    Does this allow you on the post list page to click on the link of an article and go directly to an external site to read the article? I want to cut down the selecting of 3 pages after getting to my homepage to get to an external site post. Right now it's homepage + news page + click on post link which then takes you to the post in my site which then you are able to click on the external link. You could search bing or google and get to the external article quicker and with less effort. http://roundhousetalk.com/

  5. jaydokie
    Member
    Posted 2 years ago #

    The current link is under http://roundhousetalk.com/news-2

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • List category posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic