Atanas Angelov
Forum Replies Created
-
Forum: Plugins
In reply to: [Carbon Fields] Use get_posts and order by carbon fieldsHi @joelschmid,
Let me know if this is the correct situation you have:
1. You have thecrb_ws-id
field added to all posts
2. You wish to pull all posts and order them based on the value they have in theircrb_ws-id
fieldTo achieve the above use this:
`
$args = array(
‘posts_per_page’ => 5,
‘offset’ => 0,
‘category’ => $settings->tax_post_category,
‘meta_key’ => ‘_crb_ws-id’, // NOTE: don’t forget the leading underscore – meta keys are stored with an underscore prepended to the field name
‘orderby’ => ‘meta_value_num’, // NOTE: change to ‘meta_value’ if the values in crb_ws-id are not numeric
‘order’ => ‘DESC’,
);
$myposts = get_posts( $args );
`- This reply was modified 7 years, 7 months ago by Atanas Angelov.
- This reply was modified 7 years, 7 months ago by Atanas Angelov.
- This reply was modified 7 years, 7 months ago by Atanas Angelov.
Forum: Plugins
In reply to: [Carbon Fields] Field value to display when field collapsedHi @mindtomatter,
I believe complex field’s
set_header_template()
is what you are looking for:
https://carbonfields.net/docs/complex-field-setup-methods/Forum: Plugins
In reply to: [Carbon Fields] WordPress preview doesn’t workWe don’t have a patch for this, right now.
Forum: Plugins
In reply to: [Carbon Fields] WordPress preview doesn’t workHi @alexadark,
Carbon Fields does not have support for post preview, yet. It’s in our internal backlog so it’s unclear when it will be implemented.
Forum: Plugins
In reply to: [Carbon Fields] Carbon Fields only show on home page edit screenHi @stolentino,
Using
->show_on_page( (int) get_option( 'page_on_front' ) )
should show the container only for the homepage (if you have a page assigned as the homepage of course).
Alternatively, if you have a template assigned to the homepage you can also use->show_on_template( 'template-name.php' )
.Forum: Plugins
In reply to: [Carbon Fields] update field’s valueHi @e-labo,
At this time, no – there is no specific update function for fields.
However, for simple fields you can just use the typical update_post_meta() or update_option() function depending on your context.(version 2.0 which is currently in development will have this functionality)
Forum: Plugins
In reply to: [Carbon Fields] Moving Carbon Fields custom fields above EditorHi @tinothepro,
This position is not currently available.
Feel free to post a feature request over at GitHub (https://github.com/htmlburger/carbon-fields/issues) and we’ll look into maybe adding it to 2.0.- This reply was modified 7 years, 9 months ago by Atanas Angelov.
- This reply was modified 7 years, 9 months ago by Atanas Angelov.
Forum: Plugins
In reply to: [Carbon Fields] tabbed-vertical not allowing drag-n-dropHappy to help ??
(I’ve added a ticket to our internal todo to review why the tab is not draggable in it’s entirety so we will probably see that improvement in 2.0.)
Forum: Plugins
In reply to: [Carbon Fields] Carbon Fields and Yoast SEO SupportHi @tinothepro,
Can you expand on what kind of integration between the two you are looking for?
Forum: Plugins
In reply to: [Carbon Fields] tabbed-vertical not allowing drag-n-dropHi @tinothepro,
Did you try dragging the hamburger-like icon on the left end of the tabs (it’s not the most obvious thing) rather than the rest of the tab?
Forum: Plugins
In reply to: [Carbon Fields] Remove html-tags when savedHi @brainet25,
Since this is very specific feel free to extend the Text field and implement this functionality. If you’re happy with how it works out you can even submit a pull request at https://github.com/htmlburger/carbon-fields