jarednova
Forum Replies Created
-
Forum: Plugins
In reply to: [Timber] Custom type posts are missingyup, that’ll do it to!
Forum: Plugins
In reply to: [Timber] Custom type posts are missingHi Yury, by default WP only returns posts in those queries (the
get_posts
function inherits those WP defaults). You would need to do something like:$context['posts'] = Timber::get_posts('post_type=any'); //or $context['posts'] = Timber::get_posts('post_type=test');
Forum: Plugins
In reply to: [Timber] Embed plugin into themeMarking as resolved
Forum: Plugins
In reply to: [Timber] Embed plugin into themeYep, just include the files within your theme directory and do a
require_once(__DIR__.'/timber-library/timber.php')
in yourfunctions.php
Forum: Plugins
In reply to: [Timber] Problem in menu with local hash links@jakkub I think I found and resolved the issue. The update is now in GitHub:
https://github.com/jarednova/timber
… and I’ll deploy to WP.org shortly
Forum: Plugins
In reply to: [Timber] Problem in menu with local hash linksHi Jakkub, just to make sure I understand. If you have a custom menu link pointing to…
it will strip it out to be:
A few direct before / after comparisons would be really helpful.
Also, a small sample of the twig code that’s calling the link. Thanks!
Forum: Plugins
In reply to: [Timber] getting images from ACF relationship FieldGreat to hear!
Forum: Plugins
In reply to: [Timber] getting images from ACF relationship FieldHi riikk, you just need to tell Timber how to interpret the data you get back from ACF, this line should do it….
{% set relations = TimberPost(post.get_field('my-custom-fieldname')) %}
The correct syntax for thumbnail is…
<img src="{{relation.thumbnail.src}}" alt="" />
(as opposed to post_thumbnail)
Forum: Plugins
In reply to: [Timber] Twig TemplatesI think what you’re looking for instead is…
$posts = Timber::get_posts(‘cat=14’);
…or…
$posts = Timber::get_posts(‘category_name=news’);
Timber::get_posts will take all the params for categories you find here:
https://codex.www.ads-software.com/Class_Reference/WP_Query#Category_Parameters
… and any other parts of WP_Query
Forum: Plugins
In reply to: [Timber] Twig TemplatesHi @riikk, I’d love to help but I’m having a very difficult time understanding the issue.
Can you please provide a clear explanation of
a) what you expect to happen
b) (compared to) what is actually happening
c) code you are using, and which file it is in (page.php, category.php)
d) screenshots (for example, “dropdown one normally has in wordpress’ could mean many many things)Forum: Plugins
In reply to: [Timber] Menu link outputs post idMarking as resolved
Forum: Plugins
In reply to: [Timber] Menu link outputs post idHey @dani, thanks again for calling this to my attention. I have a fix and will push to www.ads-software.com (along with tons of other new stuff) tomorrow.
Forum: Plugins
In reply to: [Timber] Menu link outputs post id@dani: which one of these calls are failing? is it…..
–
<a href="{{item.link}}">{{item.title}}<span class="caret"></span></a>
–<li><a href="{{child.link}}">{{child.title}}</a></li>
–<a href="{{item.url}}">{{item.title}}</a>
… is it one of these? two of these? or all of the above?
Forum: Plugins
In reply to: [Timber] Menu link outputs post idHi Dani,
Thanks for the report. I’ve actually moved this over to GitHub where it’s easier to track progress and code changes (not to mention, get notifications which is why I didn’t respond sooner). You can follow that issue here…
Forum: Plugins
In reply to: [Timber] TimberPost:: errors on live machinesHi @ade11. It appears that somehow the object isn’t recieving the underlying data. I’d recommend inserting…
function get_title() { print_r($this); $title = $this->post_title; return apply_filters('the_title', $title); }
… the
print_r
to figure-out what IS in the object. If you can provide access, I’m happy to do debugging via FTP so I can pin-point for you (if it’s an underlying issue, I’m very eager to get it fixed).Can you also provide info on the PHP and WordPress version the two servers are running?