gerbilk
Forum Replies Created
-
Forum: Themes and Templates
In reply to: CSS Troubles – Sticky FooterShould look more like this, you’ve added a footer-wrap around your foot, instead the wrapper refers to everything above your footer. The push div should be in the main .container (not sure it makes a difference, better to be clear though).
* { margin: 0; } html, body { height: 100%; } .container{ min-height: 100%; height: auto !important; height: 100%; margin: 0 auto -142px; } #footer-wrap, .push { height: 142px; clear: both; }
Forum: Themes and Templates
In reply to: CSS Troubles – Sticky Footerthe #footer-wrap css should instead be applied to the .container which is the equivalent of .wrapper in the example on the link i posted
Forum: Themes and Templates
In reply to: Scanning another folder for page templatesI would’ve thought you could do this by setting up relevant theme options, a little on that here https://blog.themeforest.net/wordpress/create-an-options-page-for-your-wordpress-theme/
Forum: Plugins
In reply to: Need help with complex Form/PHP/Custom Field queryi have an almost finalised version here that should do what you need
<head> <script src="https://code.jquery.com/jquery-latest.js"></script> </head> <body> <form> <select id="selectbox"> <option name="test" value="one" title="title" selected="selected">one</option> <option name="test2" value="two" title="title2">two</option> </select> <input id="update" type="hidden" value="defaultold" /> </form> <script> $(document).ready(function() { $('#update').val('default'); $('#selectbox').change(function() { $('#update').val($(this).find("option:selected").attr("title")); }); }); </script> </body>
for this you need to echo the normal field for the select options into the value=”<?php echo stuff here?>” then the additional field into title=”<?php echo stuff here?>” . I’m really going to take some time to learn jquery properly, ultra useful stuff!
Forum: Themes and Templates
In reply to: Display random images from media galleryhttps://www.rlmseo.com/blog/get-images-attached-to-post/ might be a place to start.
Forum: Plugins
In reply to: looking for an editable regions plug-inmagic fields and role manager plugins usually cover what i need. if you need more try modx or something with a bit more cms power
Forum: Themes and Templates
In reply to: Scanning another folder for page templatescould you use some kind of conditional include in your existing theme template, so inside header.php.. if ../custom/header.php exists include that else use the standard code.
Forum: Themes and Templates
In reply to: CSS Troubles – Sticky FooterForum: Plugins
In reply to: Need help with complex Form/PHP/Custom Field queryI’m pretty bad at jquery as well, I’ve had a quick play and google and found this
<head> <script src="https://code.jquery.com/jquery-latest.js"></script> </head> <body> <a href="#" title="new value">link</a> <input id="update" type="hidden" value="" /> <script> $('a').click(function(e) { e.preventDefault(); // <-- don't follow the link $('#update').val($(this).attr('title')); }); </script> </body>
what you would need to do here is echo the hidden value into the title attribute of each link and obviously be more specific with the a selector in the jquery, then change #update to the id of your hidden field. you need firebug to see this working in DOM rather than the html panel. This code works as it is, it should just be a question of echoing out your data accordingly. You could adjust this slightly and get the text() thing working
Forum: Plugins
In reply to: Need help with complex Form/PHP/Custom Field querywithout javascript you would have to refresh the page to get anything to happen, php is server side. Unless I’ve miss-understood what you are trying to do.
Forum: Plugins
In reply to: Need help with complex Form/PHP/Custom Field queryhow about this https://api.jquery.com/text/
echo the second custom field into a div which is set to display:none within the loop, so each menu item carries the additional data with it, then target it when the user clicks the menu item, so (logic rather than code) onclick .. then .. jQuery(“.class-of-second-custom-field”, this); .. then … text() use to populate the hidden field, targeted with css selectors.
If you figure this out let me know how you did it!
Forum: Fixing WordPress
In reply to: Image and CSS issueadd to style.css
#sidebar a:hover img {border:1px solid red;} for hover over
#sidebar a:active img {border:1px solid red;} on click
both work when I test them
Forum: Plugins
In reply to: Need help with complex Form/PHP/Custom Field querysomething like this? https://api.jquery.com/val/
Forum: Fixing WordPress
In reply to: Image and CSS issue#sidebar a img:hover {border:1px solid red;}
Forum: Plugins
In reply to: database query for random postspaged=2 should do it https://codex.www.ads-software.com/Template_Tags/query_posts