WordPress.org

Ready to get started?Download WordPress

Forums

Network Latest Posts
[resolved] Breaks my theme. (6 posts)

  1. BackuPs
    Member
    Posted 2 years ago #

    Hi

    Although i have set posts to 5 it displays all. And when that happens and pagination pops in. It breaks my theme completely due to the fact that there is one div missing!!! Cause by the titleonly set to true.

    My sidebar is dragg underneath the content listing.

    If i add the div after the shortcode it is working again.

    It happens when title_only is set to true !!!

    [nlposts title='Latest Posts' number='5' blogid='14' titleonly=true]
    

    like this it works

    [nlposts title='Latest Posts' number='5' blogid='14'  titleonly=true] </div>
    

    If i modify the program code to

       // Put the content where we want
    	if ($titleonly == true) { $output_string = $output_string . '</div>';}
        return $output_string;
    

    It works. So somewhere a closing div is left out.

    I also do not understand understand why the number='5' is not working in the code below

    Please help me out on this.

    i have this code

    [nlposts title='Latest Posts' number='5'  titleonly=true wrapo='<div>' wrapc='</div>' blogid=null thumbnail=true cpt=post ignore_blog=null cat=null tag=null paginate=false excerpt_length=null display_root=false auto_excerpt=true full_meta=false blogid='14']</div>
    

    Still pagination shows up.

    I hope all makes sence.

    Thanks

    http://wordpress.org/extend/plugins/network-latest-posts/

  2. BackuPs
    Member
    Posted 2 years ago #

    Hi

    If i use this shortcode i have to add a opening tag otherwise my theme sidebarbreaks completely.

    [nlposts title='Latest Posts' number='2'  titleonly=false wrapo='<div>' wrapc='</div>' thumbnail=false excerpt_length='50' display_root=false auto_excerpt=true full_meta=true blogid='14']
    

    It only works like this.

    <div>[nlposts title='Latest Posts' number='2'  titleonly=false wrapo='<div>' wrapc='</div>' thumbnail=false excerpt_length='50' display_root=false auto_excerpt=true full_meta=true blogid='14']
    

    I think there is some work need to be done. Because I use it for 10 mintes and i have already two breakups.

    Please let me know something

  3. BackuPs
    Member
    Posted 2 years ago #

    Hi

    The category shows me 5 post but not the latest ones. I want the latest 5 posts to show. Sorted from most recent to latest.

    How to accomplish this?

    Thanks

  4. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 2 years ago #

    Hi,

    Well I've tested the title only parameter and it's working without problems, I can't see where's the closing tag missing:

    <div id="wrapperw-2">
           <div id="wrapper-2">
                 <div class="network-posts blog-2">
                       <h1 class="network-posts-title">Title</h1>
                 </div>
            </div>
    </div>

    You can see at the bottom of the page the example: Network Latest Posts Examples

    To show the latest posts you should set the days parameter to the number of days you want to display, in my examples I'm using 200 days old.. You can set for example 30 for 1 month.

  5. BackuPs
    Member
    Posted 2 years ago #

    Hi Louis,

    Well i have completely written my own plugin + shortcode. Because i have never seen this kind of coding.

    Also why call the sql database like this? WP has a perfect function for switching to the correct blogid and back and while switched call for the proper recent post list?

    Anyway it has cost me a day but i have my own written code and nothing breaks anymore when a sidebar is active.

    Also my recent listed post now matches my posts in the database and not a singular is skipped.

    So i solved my problem my own way.

    Thanks again for giving me the stuff to think about and to start writing it in my own theme.

    Goodluck with your plugin.

  6. Jose Luis SAYAGO
    Member
    Plugin Author

    Posted 2 years ago #

    That's great. Good you solved your issues.

    Cheers.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic