alexadark
Forum Replies Created
-
Forum: Plugins
In reply to: [Kirki Customizer Framework] toggle, checkbox and previewsi am working on a genesis child theme btw
Forum: Plugins
In reply to: [Kirki Customizer Framework] toggle, checkbox and previewsI post an answer but it doesn’t appear
but basically yesadd_action( 'customize_preview_init', 'wst_customize_preview_js' ); /** * Binds JS handlers to make Theme Customizer preview reload changes asynchronously. */ function wst_customize_preview_js() { wp_enqueue_script( 'wst-customizer', get_stylesheet_directory_uri() . '/assets/js/theme-customizer.js', array( 'customize-preview' ), '1', true ); }
and my customizer files come afte
// Include Kirki custom controls. require_once( CHILD_THEME_DIR . '/lib/customizer/include-kirki.php' ); // Include Kirki fallback. require_once( CHILD_THEME_DIR . '/lib/customizer/kirki-fallback.php' ); // WordPress Theme Customizer. require_once( CHILD_THEME_DIR . '/lib/customizer/customizer.php' );
So the code with add_class etc… should work ?
Forum: Plugins
In reply to: [Kirki Customizer Framework] toggle, checkbox and previewsHi,
it is:`add_action( ‘customize_preview_init’, ‘wst_customize_preview_js’ );
/**
* Binds JS handlers to make Theme Customizer preview reload changes asynchronously.
*/
function wst_customize_preview_js() {
wp_enqueue_script( ‘wst-customizer’, get_stylesheet_directory_uri() . ‘/assets/js/theme-customizer.js’, array( ‘customize-preview’ ), ‘1’, true );
}`
i have this in functions.php and my customizer files are called after this one:
`// Include Kirki custom controls.
require_once( CHILD_THEME_DIR . ‘/lib/customizer/include-kirki.php’ );// Include Kirki fallback.
require_once( CHILD_THEME_DIR . ‘/lib/customizer/kirki-fallback.php’ );// WordPress Theme Customizer.
require_once( CHILD_THEME_DIR . ‘/lib/customizer/customizer.php’ );`
so it should work, i work on a genesis child themes
so normally the code i have written should work ?Forum: Plugins
In reply to: [Kirki Customizer Framework] toggle, checkbox and previewsFor the first point i have done it with js_vars and value_pattern , but this state doesn’t disappear if i change the toggle
i have tried to write my own scriptwp.customize( 'center_header', function( value ) { value.bind( function( to ) { $( '.side-header' ).removeClass().addClass( to + ' centered' ); } ); });
But it doesn’t work and i don’t find information on how to accomplish that
- This reply was modified 7 years, 7 months ago by alexadark.
Forum: Plugins
In reply to: [WP-SCSS] Doesn’t work for meI still doesn’t work for me ??
now i have it like that : https://cl.ly/m9Eg
and nothing happensForum: Plugins
In reply to: [Carbon Fields] WordPress preview doesn’t workWould it be possible to have a quick patch that i can have to my functions, as my client really want that.
ThanksForum: Plugins
In reply to: [CPT-onomies: Using Custom Post Types as Taxonomies] Updates are coming@akhanukov i think i am going to use ACF also, as if future wp updates break the plugin again, it will break the project i am working on which is very big, so i cannot take this risk.
i tried the snippet for bidirectional relationship field, but the example show it between posts in the same CPT, it doesn’t seem to work this way between to different CPTForum: Plugins
In reply to: [Polylang] Large websiteThank you!
Forum: Plugins
In reply to: [Timber] Getting terms from a custom post typeSolved it, i wrote get_posts instead of Timber::get_posts in the context !!!
to bad !
I am new to timberForum: Plugins
In reply to: [Timber] Getting featured image from Custom Post TypeSolved it, i wrote get_posts instead of Timber::get_posts !!!
to bad !Forum: Plugins
In reply to: [Timber] Getting featured image from Custom Post Typei am trying to do it for a custom post type named people,
For normal posts it is working
for CPT i can get the title and other things but not the thumbnail
This is what i have to the context:$args = array( 'post_type' => array( 'people' ), 'nopaging' => true, 'posts_per_page' => '-1', ); $people = get_posts( $args ); $context['people'] = $people;
I am quite new to timber
Forum: Plugins
In reply to: [Carbon Fields] Urgent help, all back office disappeared with the last update@eevm i don’t understand what you mean…in my case container is just assigned to pages with
->show_on_post_type( ‘page’ )Forum: Plugins
In reply to: [Carbon Fields] Urgent help, all back office disappeared with the last updateHi,
it’s very strange, i made a copy of the website update again on this on, and everything was ok.
tried on the original site, same problem
i have 3 types of custom fields
options : no pb on this ones
normal cf: no problem
groups of custom fields : these are the ones affected, front end stills ok, but they all disappear from the backend, the add entry is there but i cannot register anythingthis is the code which register them :
<?php use Carbon_Fields\Container; use Carbon_Fields\Field; $classes = Field::make( 'text', 'crb_class' ); $id = Field::make( 'text', 'crb_id' ); $content = Field::make( 'rich_text', 'crb_content' ); $title = Field::make( 'text', 'crb_title' ); $link = Field::make( 'text', 'crb_link' ); $subtitle = Field::make( 'text', 'crb_subtitle' ); $image = Field::make( 'image', 'crb_image' ); $description = Field::make( 'text', 'crb_slide_description', 'Description' ); $name = Field::make( 'text', 'crb_name' ); $country = Field::make( 'text', 'crb_country' ); $select_bg = Field::make( 'select', 'crb_select_bg', 'Select Background Color' ) ->add_options( array( 'white' => 'White', 'grey' => 'Light Grey', 'beige' => 'Beige', 'pink' => 'Light Pink', 'dark' => 'Dark Grey' ) ); $select_filter = Field::make( 'select', 'crb_select_filter', 'Select Alphabetical Filter' ) ->add_options( array( 'a_f' => 'A-F', 'g_m' => 'G-M', 'n_r' => 'N-R', 's_z' => 'S-Z', ) ); $select_col_number = Field::make( 'select', 'crb_select_col_number', 'Select Number of Columns' ) ->add_options( array( '2' => '2 Columns', '3' => '3 Columns', '4' => '4 Colums', ) ); $select_text_style = Field::make( 'select', 'crb_select_text_style', 'Select Text Style' ) ->add_options( array( 'normal' => 'Normal', 'large' => 'Large', 'small' => 'Small', ) ); $select_source = Field::make( 'select', 'crb_select_source', 'Select multimedia source' ) ->add_options( array( 'youtube' => 'Youtube', 'vimeo' => 'Vimeo', 'mp3' => 'Mp3', 'embed' => 'Embed Link' ) ); Container::make( 'post_meta', 'layouts' ) ->show_on_post_type( 'page' ) ->add_fields( array( Field::make( 'complex', 'crb_block_layouts' )->set_layout( 'tabbed-vertical' ) /** * BIG HEADING */ ->add_fields( 'big_heading', array( $select_bg, $id, Field::make( 'text', 'crb_number' ), $title, ) ) /** * 4 COLUMNS LISTS */ ->add_fields( 'four_column_lists', array( $select_bg, Field::make( 'complex', 'crb_list' )->set_layout( 'tabbed-vertical' ) ->add_fields( array( $title, Field::make( 'complex', 'crb_list_item' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $name, Field::make( 'text', 'crb_position' ), ) ) ) ) ) ) /** * SLIDER */ ->add_fields( 'slider', array( $select_bg, Field::make( 'complex', 'crb_slides' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $title, $image, $description, Field::make( 'text', 'crb_artist_name' ), $country, Field::make( 'text', 'crb_email' ), Field::make( 'text', 'crb_website' ), $link, ) ) ) ) /** * FILTERABLE LIST */ ->add_fields( 'filterable_lists', array( $select_bg, $select_col_number, Field::make( 'complex', 'crb_filterable_list_item' ) ->add_fields( array( $select_filter, $name, $country, $link, ) ) ) ) /** * TEXT EDITOR */ ->add_fields( 'text_editor', array( $classes, $select_bg, $select_text_style, $content, ) ) /** * LEFT/RIGHT */ ->add_fields( 'left_right', array( $select_bg, Field::make( 'complex', 'crb_left_right_item' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $image, $description, Field::make( 'text', 'crb_type' ), $title, $content, $link, ) ) ) ) /** * ACCORDION */ ->add_fields( 'accordion', array( $select_bg, Field::make( 'complex', 'crb_accordion_item' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $title, $content, ) ) ) ) /** * MULTIMEDIA MODAL BOXES */ ->add_fields( 'multimedia_modal_boxes', array( $select_bg, $select_col_number, $title, Field::make( 'complex', 'crb_multimedia_modal_box_item' )->set_layout( 'tabbed-horizontal' ) ->add_fields( array( $select_source, $image, $title, $content, $link, Field::make( 'text', 'crb_modal_title' ), Field::make( 'image', 'crb_modal_image' ), $description, ) ) ) ) /** * GRANTS GRID */ ->add_fields( 'grants_grid', array( $title, Field::make( 'relationship', 'crb_grants_to_display' ) ->set_post_type( 'grants' ) ) ) /** * COUNTRIES POP UP */ ->add_fields( 'countries_pop_up', array( Field::make('complex','crb_country_names') ->add_fields( array( $country, )) ) ) ) );
Forum: Plugins
In reply to: [Carbon Fields] Urgent help, all back office disappeared with the last updateThe only thing i have done is what you indicate here : https://carbonfields.net/docs/carbon-fields-getting-started/
my fields are in a plugin
For the moment i have rolled back to the previous version.
That’s really annoying, i am using carbon fields in almost all my themes, but i don’t do maintenance for my clients.
It means that i have to go back to all the sites to fix this, once i will have the solution
For the moment i don;t have so much. but i really hope you will not do things like that in the future, it can really be very problematicSo tell me what i can do to fix that and update without problems
Forum: Plugins
In reply to: [Carbon Fields] vertical tabsOh it works now
don’t know why it was not working in this particular site, when i tried