clsimco
Forum Replies Created
-
Forum: Developing with WordPress
In reply to: Making Nav Menus ‘filterable”?Thanks @joyously
I’ll dig in to that and see if I can make sense of it.I appreciate your taking the time!
Best to you
Forum: Developing with WordPress
In reply to: Nav bar dropdown issuesHappy New Year to all and many thanks to all of the moderators and others who give their time and expertise to help people learn and do!
Thank you for your interest and response @bcworkz. I think you get where I’m coming from. I’ll take a moment to clarify my intentions here, as that, in and of itself, may also help someone else on this same journey of learning.
I decided to set about learning how to create WordPress themes because I think WordPress is a fantastic and rich CMS for delivering content and exchange of information.
This theme that I have been working on and have asked for help with, is really no more than a self assigned exercise, for me to learn and implement the core languages and technologies that underlie WordPress, and, that which is layered on top of the platform. As an aside, in reality, and ironically, the teacher that the site is about, DOES NOT WANT to have a website, I have since learned. As a result, I gain the benefits of the learning process.
Your suggestion early on, when I was having issues with the comment form display really helped clarify for me the importance of keeping things simple as a starting point then building upon what works. Both for learning and actual development. _s helps on all of those counts. And yes, we all live in the real world ;^) and we all have needed help to learn at some point.
With all that said, to your current points:
“I see child items under the one “Departments” main menu item. Are these the children you were having trouble with? If so, you’ve apparently solved the issue? Or are there supposed to be more children under the children I can see? If so, the respective HTML does not exist, so there’s an issue with your nav walker handling deeper levels.”
The fist level child is working, yes, but the issue is: getting at least a second child if not also a third child. Issue is not solved, or worked around. In my understanding of the class-Wp-Navwalker, that is what does the heavy lifting to work with WordPress to create a series of childern in a dropdown menu, in the process, eliminating the html for those page menu items. See the notes by the author on Github.
You were right, _s does a fantastic job of providing the necessary framework, and I have found a couple of other themes on WordPress, that have layered bootstrap on top of _s, causing me to believe that what I want to do is is possible and could even be extended. However few bother with the extra work of the second and third child. That said, the Neve theme does seem to provide for that functionality, though not utilizing Bootstrap. So I can see that the ability of WordPress to allow for children and styling of them is latent.
As a result of all of that I have decided that the possible best approach for me at this point is to again simplify by going back to a fresh installation of _s and focus entirely on the navbar, dropdowns and levels of children along with the Codex before layering anything else in to complicate things.
I do have another unanswered question from the beginning of this topic that relates to WordPress core and php, however I will wait to pose that again until a bit later in hopes that I figure it out on my own.
Best to all!
Forum: Developing with WordPress
In reply to: Nav bar dropdown issuesThanks for the links. I also found this one among many here on the WordPress.org site
https://developer.wordpress.org/themes/getting-started/theme-development-examples/
just in case you are interested.
Anyway I’ll try posting in another forum as well. I do appreciate your time and attention.
Best to you in the new year!
Forum: Developing with WordPress
In reply to: Nav bar dropdown issuesOk. That’s interesting. Earlier, I posted a question about an issue I was having and got this reply from one of the moderators here. That’s why set off in this direction, and, have made quite a lot of progress in learning theme creation.
Where I am having an issue, as I wrote earlier, is in trying to eliminate sources where I may have made mistakes, that might be preventing WordPress from allowing dropdown children and styling of the menu.
Your patience is appreciated.
Forum: Developing with WordPress
In reply to: Nav bar dropdown issuesBTW….. not much of a forum that I can find at https://underscores.me/ or GitHub for that matter….. Would you have a more specific place that I should post the question, of a different forum here? I’m trying to learn to make themes.
Forum: Developing with WordPress
In reply to: Nav bar dropdown issuesOK thanks….. I thought _s was a framework for building a theme, not a theme.
Your direction is much appreciated
;^)
Your help made a big difference in figuring out how to work with the comment form. Thank you both.
I was able to implement a solution here based on the suggestions that you both offered. First I had to alter my thinking and remember the old adage “Don’t let the perfect be the enemy of the good”. To get the form to basically look the same as the Material Design style I sacrifices the “floating Label” functionality / effect in order to simply style the existing WordPress form. Possibly later I can come back to the issue and include that functionality into the form.
To make the form similar to the email form on the home page, here is what I did:
In the _s theme comments.php template I added the following code:
$req = get_option( 'require_name_email' ); $fields = array( // redefine author field 'author' => '<p class="comment-form-author" style="margin-top:2.0rem; margin-bottom:0.0rem;">' . '<label for="author">' . __( 'Your Name:' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label>' . '<div class="input-prepend"><span class="add-on"><i class="fa fa-address-book" style="font-size:20px; color:#9b2fae;"></i> </span><input id="author" name="author" type="text" value="' . esc_attr( $commenter['comment_author'] ) . '" size="40"' . 'aria-required="true"' . ' required /></p>', 'email' => '<p class="comment-form-email" style="margin-top:2.0rem; margin-bottom:0.0rem;"><label for="email">' . __( 'Your Email Address:' ) . ( $req ? ' <span class="required">*</span><br/>' : '' ) . '</label>' . '<div class="input-prepend"><span class="add-on"><i class="fas fa-envelope" style="font-size:20px; color:#9b2fae;"></i></span> <input required id="email" name="email" type="text" value="' . esc_attr( $commenter['comment_author_email'] ) . '" size="40"' . 'aria-required="true"' . ' required /></div></p>', 'url' => '<p class="comment-form-url" style="margin-top:2.0rem; margin-bottom:0.0rem;"><label for="url">' . __( 'Your Website:' ) . '</label>' . '<div class="input-prepend"><span class="add-on"><i class="fas fa-globe" style="font-size:20px; color:#9b2fae;"></i> </span><input id="url" name="url" type="text" value="' . esc_attr( $commenter['comment_author_url'] ) . '" size="40" /></div></p>' ); $comments_args = array( 'fields' => $fields, // redefine your own textarea (the comment body) 'comment_field' => '<p class="comment-form-comment" style="margin-top:2.0rem; margin-bottom:0.0rem;">' . '<label for="comment">' . __( '<i class="fas fa-pencil-alt" style="font-size:18px; color:#9b2fae;"></i> Your Comment:' ) . ( $req ? ' <span class="required">*</span>' : '' ) . '</label></span><textarea id="comment" name="comment" class="span12" rows="3" aria-required="true"></textarea></p>', '<div class="input-prepend"><span class="add-on"><i class="fas fa-pencil-alt" style="font-size:18px; color:#9b2fae;"></i><input id="comment" name="comment" type="text" value="' . esc_attr( $commenter['comment_author_comment'] ) . '" size="60"' . 'aria-required="true"' . ' required /></div></p>' ); comment_form( $comments_args );That enabled me to apply styles the comment form, there and in style.css. I used this solution primarily because I could not figure out how to create a separate template page for the comment form to be called from, that would work. However, once again,
“Don’t let the perfect be the enemy of the good”
Best to you both in the new year!
bcworkz
Great! A lot of information in your post…. this is really helping. Wish I could absorb faster, but I’m tenacious. You and gappiah have set me into the right direction.
I’ll let you know how things go……
Thanks to you both
;^)You both got me thinking back to the days of html 4 and I asked myself this question:
The internet has evolved so much from those days, but what are some constants that remain true and likely will into the future? For that I think we can do ourselves good by standing on the shoulders of those who were original influencers of the development of the web.
For the validity of that approach, look around at other media and applications of design from all areas: Print, TV commercials, car design and the list goes on and on. All influenced by what can and should be done to convey information visually and efficiently. Look to the masters of design in all fields, throughout history, and you will find inspiration.
That said. you’ve inspired me to revisit and explore the following sources that have credibility and continue to evolve and be influential in the areas of web design and best practices. You might also find some help here.
Check these out:
A List Apart Has evolved and grown from it’s origins as a design “Guru”
Jacob Nielson has credibility and longevity and continues to evolve
And finally you can learn a lot from things that are bad or don’t work
;^)
- This reply was modified 5 years, 4 months ago by clsimco.
Thanks for your explanation and subsequent clarification. That helps. Having gone through comments.php many times and not seeing what I expected to be obvious, your UPDATE gives me another path to follow. I’ll dive into that and let you know
Hi. First I would ask you if you want to learn to code this yourself, use a theme that you can modify to fit your content, use a website builder or, have someone else do it for you. Thats what you have to ask yourself.
Then, in answer to your question, if you picked any of the first thee choices, I would say (A.) study the code for the sites that you like the design of. View source in your browser and see how it’s laid out and what kind of framework that is used.
If you don’t want to, or are not ready to, code it yourself entirely, then you could find a theme framework that is similar to what you like and place your content in it. If you do that , see (A.) in the previous paragraph.
For a website builder, same as above,
If you want someone else to build it, Be clear in your communication and provide them examples to show them what you want the end product to look like.
Hope that this helps.Forum: Developing with WordPress
In reply to: Comment form misplacedHello bcworkz
I wanted to thank you for your help in pointing me in the right direction to solve the issue that I was experiencing. You made a BIG difference with your clear explanations, allowing me to move in the right direction to solve the issue while actually learning.
I followed your suggestion and implemented the _s frame, then carefully studied the template structure / parts / code, in order to layer my design on top and manipulate a couple of elements in _s. In doing so, using elements of Google Material Design, MDBootstrap and Material Kit, first and foremost, the div structure needed to achieve the correct display fell into place, so that the comments section displayed in the correct place. (NOTE: I am not taking credit here for the design elements, merely implementing and learning to manipulate them.)
That said, I have other questions that have arisen, but I am not certain of best practice, etiquette here in this forum. Specifically, should I start a new topic for each question even if related to the original question?
Thanks again
Forum: Developing with WordPress
In reply to: Comment form misplacedThank you! That REALLY helps point me in the right direction. I’ll dive into your suggestions and investigate later today, then let you know. MUCH appreciated.
Forum: Developing with WordPress
In reply to: Comment form misplacedThank you sir, for your detailed insight. You are absolutely correct in your key observations. At the basic level I understand what you are saying, and that is why I made the notes on the template parts to identify what is being called and displayed, and where displayed. That, with the objective to “fix” it.
Taking the points in your reply in order:
Use a very basic starter theme, like the one from underscores.me for guidance
Yes, (I have that one and others to play with) The bulk of the styling and most theme components are from a tutorial that I followed.
Something’s wrong with that form you don’t want anyway. As it’s going away, it’s not worth finding the problem. The form below the footer at least displays to me like it should for a non-logged in user.
Yes, you understand perfectly. I can delete the code that is in the “div” in the display page, that is being called from “content-single.php”. The form and comments that are being displayed below the footer IS INDEED what I want to replace it. I’m trying to learn / understand how to call it there (and why it’s placing itself there in the first place so that I can fix it.
Conversely, identifying code on a template responsible for certain output can be assisted by identifying more recognizable code generating output before or after the questionable content.
Yes, I understand and agree. Again why I placed the DEBUG notes. I’m just stuck for what to do about it.
As to comments assigned to the wrong post, if you are using the first form which has a problem, stop doing that 🙂 It needs to go away. The version below the footer ought to be relocated, it looks more promising.
Yes! You understand! Again that’s why I placed the DEBUG notes. the form above the footer IS wrong (it’s from the tutorial I followed, as mentioned earlier) and I will make it go away. I’m just stuck on how to call the code that displays the footer that I WANT to be there, the one that is displaying below the footer, whose source file is “comments.php”
So to be clear, I see exactly what you are saying and suggesting, but I have exhausted the extent of my knowledge for how to fix it. I could and willing to post the code for each of the three .php pages involved, if that would help.
Forum: Developing with WordPress
In reply to: Comment form misplacedThis post is about debugging