AMCD
Forum Replies Created
-
Forum: Themes and Templates
In reply to: CSS Classes (optional) not outputting to sourceYour right… I did some digging and found this in my functions.php
function remove_css_selector_attributes($input) { return preg_replace('/ (id|class)=\"(.*?)\"/', '', $input); } add_filter( 'wp_nav_menu', 'remove_css_selector_attributes' );Added by the original author of the blank theme template I’m using… in order to clean up the garbage classes WP ads to the menu code I presume.
Thanks for your help!
Forum: Themes and Templates
In reply to: CSS Classes (optional) not outputting to sourceYup…. this is being generated by a custom menu
Functions.php:
if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'headernav' => __( 'Header Navigation' ), 'footernav' => __( 'Footer Navigation' ) ) ); }Calling in template:
<nav id="headnav"> <?php wp_nav_menu( array( 'theme_location' => 'headernav') ); ?> </nav>Forum: Themes and Templates
In reply to: CSS Classes (optional) not outputting to sourcemy bad:
<nav id="headnav"> <ul> <li><a href="http://localhost/amc/products/">Products</a></li> <li><a href="http://localhost/amc/services/">Services</a></li> <li><a href="http://localhost/amc/locations/">Locations</a></li> <li><a href="http://localhost/amc/contact/">Contact</a></li> </ul> </nav>As you can see… pretty standard stuff… just wont output the class
Forum: Themes and Templates
In reply to: CSS Classes (optional) not outputting to sourceDeveloping it locally…
Forum: Fixing WordPress
In reply to: Grabbing Page ExcerptsFigured it out finally… I hope this helps someone in the future.
Script for listing sub pages of the current page:
<?php // List Sub Pages $mypages = get_pages('child_of='.$post->ID.'&sort_column=post_title&sort_order=desc'); foreach($mypages as $page){ ?> <h2><a href="<?php echo get_page_link($page->ID); ?>"><?php echo $page->post_title; ?></a></h2> <?php echo $page->post_excerpt; ?> <?php } ?>Remember to add excerpt for pages in the functions.php:
// Add page excerpt function function page_excerpt() { add_post_type_support('page', array('excerpt')); } add_action('init', 'page_excerpt');Forum: Fixing WordPress
In reply to: Grabbing Page ExcerptsThis seems to be grabbing the current pages excerpt… how can I get the subpage that the loop is currently on?
Forum: Fixing WordPress
In reply to: Listing subpages with custom fields on parent pageNothing? I thought this would be a simple thing to do… how can I get thumbnails when listing sub pages of a page?
Forum: Themes and Templates
In reply to: The Disappearing Search SpritesMods can remove – resolved due to the actual file name being ‘BTNSprites.png’ server didnt like the caps… big brain fart on my part (its been a long day)
Forum: Themes and Templates
In reply to: Styling wp_get_archives with post countsExcellent! That did the trick… I’m assuming something similar will work with the categories links as well?
If your willing to give up that function as well you would be my hero 🙂
Thanks!
Forum: Plugins
In reply to: Contact Form 7 – Generating Reference NumberI used the negative text-indent trick to push it out of the visible width of the browser:
.hideMe{ display:block; position:absolute; text-indent:-9999px; float:left; }Of course IE7 and below dosent like this so in my IE conditional css file pushed it out using margin:
.hideMe{ margin:0 0 0 -9999px; }Don’t know if this is the best method but its working… Would be better if Contact Form 7 supported hidden fields, maybe in the future it will.
Forum: Plugins
In reply to: Contact Form 7 – Generating Reference NumberYes that is what it will do…
change the
$length = 8;to whatever you want and you can add additional characters to the$characters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"string if you want as well. (ie !@#$% or lowercase abcdef etc…)Forum: Plugins
In reply to: Contact Form 7 – Generating Reference NumberIn your functions.php you will need a function to generate the random string:
/* Generate Quote Ticket */ function genTicketString() { $length = 8; $characters = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; for ($p = 0; $p < $length; $p++) { $string .= $characters[mt_rand(0, strlen($characters)-1)]; } return $string; } add_shortcode('quoteticket', 'genTicketString');Next make sure you’ve installed the contact-form-7-dynamic-text-extension plugin and add the dynamic field into the form. This is what I used (wrapping it in a span to hide the input with css):
<span class="hideMe">[dynamictext ticket "quoteticket"]</span>“quoteticket” calls the function populates the input with a random string (set the length etc in the function)
and finally add the ticket to your email body with [ticket]
Hope that helps!
I just ran into this issue as well… confirmation works fine once the code is removed. Anyone know of a solution? I’m using the following:
on_sent_ok: "pageTracker._trackPageview('/contact-us/Submit.htm');"Forum: Fixing WordPress
In reply to: Custom permalinks dont work unless index.php is includedJust solved it… had to do the .htaccess override for the virtual host location as well as root in the httpd.conf file
<Directory />
Options Indexes FollowSymLinks
AllowOverride All
</Directory>Forum: Fixing WordPress
In reply to: Custom permalinks dont work unless index.php is includedI should note that Apache is running on Windows Server 2003