Digital experiences for all disciplines
New Landing › How can we help? › Themeforest Theme Support › Dante › Recent Posts more link
New Landing › How can we help? › Themeforest Theme Support › Dante › Recent Posts more link
- This topic has 14 replies, 3 voices, and was last updated 9 years by Kyle – SUPPORT.
-
Posted in: Dante
-
December 1, 2014 at 11:54 am #132510
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.
HansDecember 1, 2014 at 1:47 pm #132570Hi
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
December 1, 2014 at 3:32 pm #132613So 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?
December 1, 2014 at 3:36 pm #132614I’m afraid we can’t support customisations such as this one, it’s in your hands. Otherwise hire a developer to help you
– Kyle
December 1, 2014 at 4:50 pm #132631Do you have any idea if it is dangerous to add to the params list in…
SPBMap::map( ‘recent_posts’, array(
..“params” => array(
..?
December 1, 2014 at 8:02 pm #132651I 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.
December 2, 2014 at 12:40 pm #132782Hi,
I’m sorry but like Kyle already told that goes beyond our scope support. This can be a customization that can take sometime.
-Rui
December 2, 2014 at 11:38 pm #132994Hi,
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.
HansDecember 2, 2014 at 11:51 pm #132997Hi,
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
December 3, 2014 at 12:48 am #133008Hi,
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
December 3, 2014 at 12:56 am #133010Guess 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
December 3, 2014 at 1:09 am #133015Yes, 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
December 3, 2014 at 1:17 am #133018Great. 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
December 3, 2014 at 1:49 am #133023I see.. that is a good page for reference. Overlooked i guess. ๐
Hans
December 3, 2014 at 8:01 am #133051Thanks Rui
-
Posted in: Dante
You must be logged in and have valid license to reply to this topic.