WordPress.org

Ready to get started?Download WordPress

Forums

Posts By Tag
[resolved] Styling title CSS when displaying multiple full posts on a page (2 posts)

  1. Cyanara
    Member
    Posted 1 year ago #

    Hi Sudar,

    I've been using the following shortcode to display full posts on a page:

    [posts-by-tag tags = "Animation" number = "5" content = "true"]

    And it works great, so thanks for that.

    The one problem I had was that entry titles were being outputted without CSS tags, so I thought I might suggest adding this in as a possible improvement in a future version.

    At the very least, I figured I'd post my suggested code (that seems to be working) here for anyone else who might have the same problem :)

    Starting at line 939, replace:

    // add permalink
                    $output .= '<a href="' . $permalink . '"';
    
                    if ($link_target != '') {
                        $output .= ' target = "' . $link_target . '"';
                    }
    
                    $output .= $onclick_attr;
                    $output .= '>' . $tag_post->post_title . '</a>';

    with

    // add permalink and style post title
                    $output .= '<h1 class="entry-title"><a href="' . $permalink . '"';
    
                    if ($link_target != '') {
                        $output .= ' target = "' . $link_target . '"';
                    }
    
                    $output .= $onclick_attr;
                    $output .= '>' . $tag_post->post_title . '</a></h1>';

    The CSS for this particular example would be:

    h1.entry-title a {
    /*styling goes here*/
    }

    Regards,

    Joe

    http://wordpress.org/extend/plugins/posts-by-tag/

  2. Sudar
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks for the suggestion. I have fixed it in v3.0.2 of the Plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic