Golok
Forum Replies Created
-
Forum: Plugins
In reply to: [AJAX Login and Registration modal popup + inline form] comments loginHi @kaminskym,
I finally managed to access the JS, but the only result is that the link to which the event is linked doesn’t work anymore; one clicks and nothing happens. I deactivate the script and the link works (but send me to the default login page), I activate the script and the link is dead…
Any suggestion?
Once again thanks zillions for your help.
Forum: Plugins
In reply to: [AJAX Login and Registration modal popup + inline form] comments loginThank you so much @kaminskym for your quick reply. Very unfortunately it doesn’t seem to work.
I created a
load_modal.js
file with your script:jQuery(document).on('click', '.must-log-in>a', function (event) { event.preventDefault(); $(document).trigger('lrm_show_login', [event]); return false; });
I then added the following in
functions.php
to enqueue this script:add_action( 'wp_enqueue_scripts', 'add_my_script' ); function add_my_script() { wp_enqueue_script( 'load_modal', // name your script so that you can attach other scripts and de-register, etc. get_template_directory_uri() . '/js/load_modal.js', // this is the location of your script file array('jquery') // this array lists the scripts upon which your script depends ); }
Isn’t it the correct way to add a .js script?
Forum: Plugins
In reply to: [AJAX Login and Registration modal popup + inline form] comments loginHi @kaminskym,
I finally found the source of my problem: it is a conflict with Lazy Load for Comments plugin. If I deactivate it, everything works fine.
Would you imagine any work around?
In advance thanks for your precious help.
Forum: Plugins
In reply to: [AJAX Login and Registration modal popup + inline form] comments loginHi @kaminskym,
Thanks a lot for your help.
I must be stupid, but whatever I put in this field it just doesn’t work
The class does not even show up in the link to reply to a comment or in the link to comment:
Any suggestion?
Thanks a lot @kaminskym.
The solutions given on the above threat do not work for me. I replied in details there.
Forum: Plugins
In reply to: [AJAX Login and Registration modal popup + inline form] comments loginHello,
Unfortunately, adding
.must-log-in>a
to the plugin Advanced tab in the extra login selector field does not work for me, nor does.must-log-in a:link
As for adding the class
lrm-login
to the link in comments.php, I’m not sure where as I don’t see any link. The only link to login I can find is within WordPress itself, in itsfunction get_comment_reply_link()
(/wp-includes/comment-template.php).Is there a way to add a filter/action to this function?
function get_comment_reply_link( $args = array(), $comment = null, $post = null ) { $defaults = array( 'add_below' => 'comment', 'respond_id' => 'respond', 'reply_text' => __( 'Reply' ), 'reply_to_text' => __( 'Reply to %s' ), 'login_text' => __( 'Log in to Reply' ), 'max_depth' => 0, 'depth' => 0, 'before' => '', 'after' => '' ); $args = wp_parse_args( $args, $defaults ); if ( 0 == $args['depth'] || $args['max_depth'] <= $args['depth'] ) { return; } $comment = get_comment( $comment ); if ( empty( $post ) ) { $post = $comment->comment_post_ID; } $post = get_post( $post ); if ( ! comments_open( $post->ID ) ) { return false; } $args = apply_filters( 'comment_reply_link_args', $args, $comment, $post ); if ( get_option( 'comment_registration' ) && ! is_user_logged_in() ) { $link = sprintf( '<a rel="nofollow" class="comment-reply-login" href="%s">%s</a>', esc_url( wp_login_url( get_permalink() ) ), $args['login_text'] ); } else { $onclick = sprintf( 'return addComment.moveForm( "%1$s-%2$s", "%2$s", "%3$s", "%4$s" )', $args['add_below'], $comment->comment_ID, $args['respond_id'], $post->ID ); $link = sprintf( "<a rel='nofollow' class='comment-reply-link' href='%s' onclick='%s' aria-label='%s'>%s</a>", esc_url( add_query_arg( 'replytocom', $comment->comment_ID, get_permalink( $post->ID ) ) ) . "#" . $args['respond_id'], $onclick, esc_attr( sprintf( $args['reply_to_text'], $comment->comment_author ) ), $args['reply_text'] ); } return apply_filters( 'comment_reply_link', $args['before'] . $link . $args['after'], $args, $comment, $post ); }
Forum: Developing with WordPress
In reply to: Filter/action to modify the “Log in to Reply” link?Naughty moderator… ??
Topic closed here and moved to the right place.
Forum: Developing with WordPress
In reply to: Filter/action to modify the “Log in to Reply” link?Oops, it seems I’m not allowed to do this…
ERROR: Duplicate topic detected; it looks as though you’ve already said that!
Forum: Developing with WordPress
In reply to: Filter/action to modify the “Log in to Reply” link?Thanks for the recommendation. I mark this as “resolved” and ask the question in the relevant forum
Forum: Fixing WordPress
In reply to: Next and previous post navigation on static front page?Hi @jcastaneda,
Thanks, I tried
get_next_posts_link()
andget_previous_posts_link()
(without “s”), but unfortunately it doesn’t work…Forum: Fixing WordPress
In reply to: Two-column layout (blogposts and sidebar) on home pageClosing the topic as resolved. Thanks @danthefan.
Forum: Fixing WordPress
In reply to: Two-column layout (blogposts and sidebar) on home pageThanks @danthefan for this
em
advice. Actually I was only copying the formatting from Twenty Seventeen’s style.css. I’ve got to do some homework.And thanks a bunch for this “Media Queries for Standard Devices” link, that exactly the reference I needed!
Forum: Fixing WordPress
In reply to: Two-column layout (blogposts and sidebar) on home pageFantastic, it worked.
It took me quite a while to figure out where to insert this famous
flex
(and my code is still in a mess), but I’m on the right track: my home page is set on two columns as I wished.I’m not sure if this was normal, but to avoid having the two columns sitting next to each other on mobile devices, I had to use the following media queries to apply different widths:
@media screen and (min-width: 30em) { .home-left { width: 100%; } .home-right { width: 100%; } } @media screen and (min-width: 48em) { .home-left { width: 58%; } .home-right { width: 36%; } }
Once again, thanks a lot @danthefan.
Forum: Fixing WordPress
In reply to: Two-column layout (blogposts and sidebar) on home pageWow, thanks a lot @danthefan for this link! It definitely helps a lot to understand containers and items in CSS.
When I start from scratch I usually don’t have much problem, but since I’m working on existing code and css, it just can’t find my way.
Anyone who could spot where I got it wrong?
Forum: Plugins
In reply to: [Timeline Express] Changing "announcement" directory name?Hi Evan,
Sorry for my late reply and thanks for your answer.
I’m referring to the slug in the URL. I wish to use the plugin for an historical timeline, and as such would prefer to have something like ‘www.mysite.com/events/’.
Cheers,