scottcarlton
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Sidebar for Category Child PageThanks for the quick reply, that was my first option. Unforchantely I don’t know what each child will be because the client will add children as press articles are posted. So I need an archive category that will apply the custom sidebar to any child that will fall under the parent (press). Not sure if that sounds clear though.
Forum: Fixing WordPress
In reply to: Custom Search of Custom Types and FieldsNo Help to this question. Closed
Forum: Themes and Templates
In reply to: Advanced Search Formthis topic doesn’t seem to have support. Close Post.
Forum: Fixing WordPress
In reply to: Show/Hide div in loopBig Bagel, I wanted to thank you for all your help and teaching me some great stuff along the way! Thanks again!
Forum: Fixing WordPress
In reply to: Show/Hide div in loopgot the toggle working the way I wanted it to with the code bellow.
$(document).ready(function() { $('.bio-block').hide(); $('.show').click(function(event){ event.preventDefault(); var sliderContent = $(this).next('.bio-block'); $('.bio-block').not(sliderContent).hide(); sliderContent.toggle(); }); $('.close').click(function(){ $(this).parent().hide(); }); });
Forum: Fixing WordPress
In reply to: Show/Hide div in loopforgot about that. Fixed it and now works. Almost there now. Just have to get it to close div if another div is clicked to open and get the footer to move down when open.
Thanks again for all your help!Forum: Fixing WordPress
In reply to: Show/Hide div in loopFixed the class issue and set “a” to .show instead. Then set jquery .show back to .slideToggle
Now just need to get the function working through function.php
Forum: Fixing WordPress
In reply to: Show/Hide div in loopYa, I removed the script from the header. had the script run in the page just to get it working. Can’t get the function.php to work with
function add_my_js() { wp_register_script( 'my-author-js', get_template_directory_uri() . '/author-toggle.js', array( 'jquery' ), false, true ); wp_enqueue_script( 'my-author-js' ); }
the file is under wp-content/theme/my-theme
Once I remove the code from the page directly and place the code back in the js file with the add_my_js in function.php it doesn’t work. Would like to put the file in my js folder under wp-content/theme/my-theme/js
I have been building this theme from scratch. Here is my function.php
Forum: Fixing WordPress
In reply to: Show/Hide div in loopAlright we are making headway here. I have got the code working with this
$(document).ready(function(){ $('.hidden').hide(); $('a').click(function(){ $( this ).next('.hidden').show('fast'); $('a.close').click(function(){ $('.hidden').hide('fast'); }) }); });
It allow only the one div to be opened. Now just have to get it opening div and if another is open close it.
Forum: Fixing WordPress
In reply to: Show/Hide div in loop$(document).ready(function(){ $('.hidden').hide(); $('a').click(function(){ $('.hidden').show('slow'); $('a.close').click(function(){ $('.hidden').hide('slow'); }) }); });
Forum: Fixing WordPress
In reply to: Show/Hide div in loopOk I have got it to work with this. But it opens all the hidden divs. Now I need to had a parent/child to it if I am correct.
<script src=”https://pastebin.com/embed_js.php?i=LH7xvpyf”></script>
I had to post the code directly into the page though, because it’s not working through function.php
Forum: Fixing WordPress
In reply to: Show/Hide div in loopDoesn’t seem to be loading the js file.
Forum: Fixing WordPress
In reply to: Show/Hide div in looppage is up. here
Still not working. Right now just copy pasted as you say just to see if I could get it working. There will be multiple ones though because it is in the query post loop.
Thanks for your help. This defiantly help me understand this alot more.
Forum: Fixing WordPress
In reply to: Show/Hide div in loopHere is a link to what I am trying to accomplish so what.
So I have my get_title and professional title with image in a box with the “a href” attribute and get_content and contact info in a hidden div until clicked. All in a loop.
Wish I had more, but as I work on this will try and get a page up for you to see. Thanks again!
Forum: Fixing WordPress
In reply to: Show/Hide div in loop@big Bagel
Thanks for your response. Ya, the code as of now is in the header.php file. Not sure if that is best, but as a newbie and not an experienced js coder or wordpress coder, it’s the easiest for me. This issue is that it does target all hidden divs causing them all to open or close. The other issue that I came across in the loop is that it will target only one div instead of the div in that particular loop posting. I keep search google for a fix, but haven’t found one yet.
As for the plugin, it looks great, but I am trying to stay away from plugins as much as possible. I would rather learn how to do it versus just adding a plugin for something. Helps me learn. Just a personal thing. Plus my trying to make it user friendly as possible for my client. So shortcode just adds one more think to teach my client.@swansonphotos
Thanks for the posting code rules. I’m new to the forums and didn’t realize the code posting. It will be helpful in the future