dwood7399
Forum Replies Created
-
The address, website and name fields work, but text-area and email do not, strangely. I’m using the Reverie framework which is based on Foundation 5.
I think I’m going to switch to Contact Form 7 anyway since it’s free and I can use the foundation form classes within its form editor.
This reload code doesn’t work for me.
I think it could be due to an update of WP Contact Form 7 (v 3.3.1), the scripts.js is in a subdirectory of the plugin’s folder. I updated the path to the new folder, with no success:
jQuery.get('localhost:8888/jjz/wp-content/plugins/contact-form-7/includes/js/scripts.js', function(data) { eval(data); });
I’m not very familiar with ajax, so I love this plugin, but need to get my form working. Thanks!
Forum: Themes and Templates
In reply to: How to change single post template based on category?For the sake of anyone else looking, add this filter to your functions.php and name your template file to match the category slug: single-[cat slug].php. If you’re using a child theme, replace TEMPLATEPATH with STYLESHEETPATH
https://designisphilosophy.com/tutorials/creating-custom-single-post-templates///Gets post cat slug and looks for single-[cat slug].php and applies it add_filter('single_template', create_function( '$the_template', 'foreach( (array) get_the_category() as $cat ) { if ( file_exists(TEMPLATEPATH . "/single-{$cat->slug}.php") ) return TEMPLATEPATH . "/single-{$cat->slug}.php"; } return $the_template;' ) );
Thanks adelonwl, I forgot I had changed the ‘Reading’ settings, they now show up in the twentyeleven theme.
Unfortunately like robinmchugh I’m using an Organic parent theme that uses the Options Framework plugin to choose the categories to display on the home page. I think since it only allows me to choose categories, rather than custom post types, that is the issue, correct?
Any ideas?
Site is here: https://www.evolveboston.com/wp_themetest/
Thanks!
@adelonwl
I am also looking to show event posts in both the Event’s page as well as the main Loop on my home page. I’ve added your function to my functions.php file, but the event’s aren’t showing in my main loop, even in TwentyEleven theme.
Is there another adjustment I need to make to the loop itself?
Thanks!