anUser
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Insert block programmatically to a page thanks to its idfunction capacity_template() { if( $_GET['post'] === capacity_get_option('service', 'services_page')){ $services_page = get_post_type_object( 'page' ); $services_page->template = [[ 'capacity/services', [], [] ]]; $services_page->template_lock = 'all'; return false; } [...] } add_action( 'init', 'capacity_template' );
the above function does what I wish to do … the problem is solved.
Forum: Developing with WordPress
In reply to: Insert block programmatically to a page thanks to its idin a 1st tempas, the admin chooses the services page (among the existing pages). in a second time, a block that indexes all the pages of services that the admin has created must be inserted on this page that was chosen … I have the impression that you do not understand me… if you have a better idea, you can say, I do not have much experience in creating template or plugin
Forum: Developing with WordPress
In reply to: Insert block programmatically to a page thanks to its id@@joyously, the theme is linked to a plugin and custom blocks are built into the plugin.
Forum: Developing with WordPress
In reply to: Get option value (api setting) in block@mattyrob, Thank you for your answer, I am learning redux with react to be able to do that.
Forum: Fixing WordPress
In reply to: Adding category for a post– Version of WordPress: 4.9.7
– Error in editing a post in developer console (where you see JS or Jquery error)
– It s normal post<p>load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery-color,wp-lists,quicktags,jquery-query,admin-comments,sug&load[]=gest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,postbox,jquery-ui-position,jquery-ui-menu,wp-a11y,jquery&load[]=-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,svg-painter,wp-auth-check,shortcode,backbone,wp-&load[]=util,wp-backbone,media-models,wp-plupload,wp-mediaelement,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,imga&load[]=reaselect,image-edit,editor,wplink,thickbox,media-upload,wp-embed&ver=4.9.7:115 Uncaught TypeError: Cannot read property 'responses' of undefined at Object.c [as addAfter] (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery-color,wp-lists,quicktags,jquery-query,admin-comments,sug&load[]=gest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,postbox,jquery-ui-position,jquery-ui-menu,wp-a11y,jquery&load[]=-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,svg-painter,wp-auth-check,shortcode,backbone,wp-&load[]=util,wp-backbone,media-models,wp-plupload,wp-mediaelement,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,imga&load[]=reaselect,image-edit,editor,wplink,thickbox,media-upload,wp-embed&ver=4.9.7:115) at Object.j.is.d.element.wpAjax.validateForm.d.data.match.d.complete (load-scripts.php?c=0&load[]=hoverIntent,common,admin-bar,heartbeat,autosave,wp-ajax-response,jquery-color,wp-lists,quicktags,jquery-query,admin-comments,sug&load[]=gest,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,postbox,jquery-ui-position,jquery-ui-menu,wp-a11y,jquery&load[]=-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,svg-painter,wp-auth-check,shortcode,backbone,wp-&load[]=util,wp-backbone,media-models,wp-plupload,wp-mediaelement,wp-api-request,media-views,media-editor,media-audiovideo,mce-view,imga&load[]=reaselect,image-edit,editor,wplink,thickbox,media-upload,wp-embed&ver=4.9.7:10) at i (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.7:2) at Object.fireWith (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.7:2) at y (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.7:4) at XMLHttpRequest.c (load-scripts.php?c=0&load[]=jquery-core,jquery-migrate,utils,moxiejs,plupload&ver=4.9.7:4)</p>
Forum: Developing with WordPress
In reply to: Loop cutsom post type in meta box<?php $args = array('post_type' => 'capacity_portfolio', 'orderby' => 'modified'); $pages = get_posts( $args ); foreach ( $pages as $page ) : setup_postdata( $page ); echo $page->post_title; endforeach; wp_reset_postdata();
The problem is solved…
Forum: Developing with WordPress
In reply to: Loop cutsom post type in meta boxThank you for your answer. There is no problem with the name of the custom post type. Otherwise, I tried with the post type ‘page’, it works, but when I try with post type ‘post’ or custom post type ‘capacity_service’, I have the same problem …
I specify that I am in a meta box. I am not on a template (example: page.php).
Forum: Developing with WordPress
In reply to: Send mail with STMP@diondesigns, thank you for your answer which is very beneficial. myself experienced $ phpmailer-> Port and $ phpmailer-> SMTPSecure and what you wrote is correct.
In the question that I asked in my previous message, I wanted to say that it is not obvious for a lambda user (a website designer with wordpress is not necessarily a professional) to find the coordinates STMP …
? I also looked to make a plugin ‘SMTP’, I did for gmail and 1and1 … I have more difficulty with outlook for example. But I did not spend a lot of time on ??
- This reply was modified 7 years ago by anUser.
Forum: Developing with WordPress
In reply to: Send mail with STMP@diondesigns, the code below solves my problem :
`function init_smtp( $phpmailer ) {
$phpmailer->isSMTP();
$phpmailer->Host = ‘smtp.example.com’;
$phpmailer->SMTPAuth = true;
$phpmailer->Port = 25; // May need to be changed
$phpmailer->Username = ‘username’;
$phpmailer->Password = ‘password’;
}add_action( ‘phpmailer_init’, ‘init_smtp’ );
However, here it is a template that I build. the user should easily find $ phpmailer-> Host, $ phpmailer-> Username and $ phpmailer-> Password ?
Forum: Developing with WordPress
In reply to: Send mail with STMP@bcworkz, I used the filters ‘wp_mail_from’ and ‘wp_mail_from_name’, it’s cleaner, but it does not change the fact that the mail goes into the pams or is not received.
Forum: Developing with WordPress
In reply to: Send mail with STMP@sterndata, this is a theme that also contains plugin that I created for the running of the theme.
Forum: Developing with WordPress
In reply to: Send mail with STMPForum: Fixing WordPress
In reply to: unique page as about-usThank you for your answer, I will take into account your answer to make a decision.
Forum: Fixing WordPress
In reply to: WordPress : upload image from PC (Jquery )I waited more than 24 hours, I allow myself to write a new message in order to relaunch the problem, because it is not resolved yet.