New Landing How can we help? Themeforest Theme Support Dante Recent Posts more link

Viewing 15 posts - 1 through 15 (of 15 total)
  • Posted in: Dante
  • #132510
    schillerinstitut
    Member
    Post count: 28

    Hi,
    i would like to have a customized ‘more’ link added to ‘recent posts’ elements.
    For customization i just need to be able to define the text. And it should of course appear at the bottom after the posts.
    Hans

    #132570
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    I’m afraid that’s not part of the current them functionality. If you wanted to add that in you would have to edit the recent-posts.php file

    – Kyle

    #132613
    schillerinstitut
    Member
    Post count: 28

    So after this line (line 219)..
    $output .= “\n\t\t\t\t”.$items;
    in the file i should put in my ‘more’ html in the same manner.

    And then i just need the variable for the link and to check the variable $item_count if it is not zero?

    #132614
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    I’m afraid we can’t support customisations such as this one, it’s in your hands. Otherwise hire a developer to help you

    – Kyle

    #132631
    schillerinstitut
    Member
    Post count: 28

    Do you have any idea if it is dangerous to add to the params list in…
    SPBMap::map( ‘recent_posts’, array(
    ..

    “params” => array(
    ..

    ?

    #132651
    schillerinstitut
    Member
    Post count: 28

    I tried to do the changes i mentioned first and it worked fine, only the link was not really correct.

    Now I am just asking for an overall opinion on the SPBMap change i suggest.

    I need this other param, but i am unsure because it makes changes towards the database and i don’t know how that works really yet.

    #132782
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    I’m sorry but like Kyle already told that goes beyond our scope support. This can be a customization that can take sometime.

    -Rui

    #132994
    schillerinstitut
    Member
    Post count: 28

    Hi,
    i am managing my customization and it is going well. Not so difficult. I just miss one information now…

    is the $category variable in recent-posts.php a structure and is there somewhere i can find that structure?

    If you can inform me on this it would be a help, otherwise i am about to find out on my own.
    Hans

    #132997
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Hi,

    That category will grab the info select in the Category field in the asset modal.
    It grabs the name of the select categories and separates the values and store them in an array in this line

    
    $category_array = explode(",", $category_slug);
    

    Hope it helps.

    p.s- We never know what exact time this customizations take, if something goes wrong they could take much time than that we have to answer all the customers. We are to help.

    -Rui

    #133008
    schillerinstitut
    Member
    Post count: 28

    Hi,
    I am as of now using the ‘recent posts’ entity with only one category. I see that what i am doing does not really make sense in the case of selecting multiple categories.

    Anyway i now only need to get hold of the category Id from the selected category. Unfortunately $category_array[0] which coincides with $category does not contain the category ‘name’ field but something else that i am trying to find out how it can give me the category id, so that i can use get_category_link( id ) and i am done.

    Hans

    #133010
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Guess it contains the category slug.

    You can try something like this

    
    $idObj = get_category_by_slug($category_array[0]); 
    $id = $idObj->term_id;
    $cat_link = get_category_link( $id ); 
    

    -Rui

    #133015
    schillerinstitut
    Member
    Post count: 28

    Yes, that is exactly what it was. ๐Ÿ™‚

    Not so easy to figure out what a ‘category slug’ is…
    Seems like a bit ambiguous name to me, but my changes works now.
    Thanks.

    Hans

    #133018
    Rui Guerreiro – SUPPORT
    Keymaster
    Post count: 25779

    Great. Congrats.

    Take a closer look in this link, it’s important to understand better how WordPress works.
    http://codex.wordpress.org/Glossary#Post_Slug

    -Rui

    #133023
    schillerinstitut
    Member
    Post count: 28

    I see.. that is a good page for reference. Overlooked i guess. ๐Ÿ™‚

    Hans

    #133051
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Thanks Rui

Viewing 15 posts - 1 through 15 (of 15 total)

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register