vehemoth
Forum Replies Created
-
Sorry for the bump. I’m still having problems.
Does anyone have any advice for this?
Can I provide more information?Thanks.
Forum: Themes and Templates
In reply to: apply_filters('the_content', $content) with get_posts();Though I thought that
$content = apply_filters('the_content', $content);
would have been enough to declare the variable!Forum: Themes and Templates
In reply to: apply_filters('the_content', $content) with get_posts();You hit the nail on the head! That did the trick.
The reason I’m didn’t want to use
the_content()
directly is because I needed the content in a string in order to perform other functions prior to it being displayed on the page.Thanks again!
Forum: Fixing WordPress
In reply to: Problems with wp_enqueue_script in functions.phpAh, I just learned so much from that bit of info. Problem solved, thanks heaps Matt!
Forum: Fixing WordPress
In reply to: Problems with wp_enqueue_script in functions.phpThank for your speedy reply, Matt.
My theme has
<?php get_header(); ?> /*html*/ <?php get_footer(); ?>
it is also a custom page, could this be an issue?
Forum: Fixing WordPress
In reply to: Problems with wp_enqueue_script in functions.phpOk, I’ve tried everything I can possibly think of – nothing is working except adding the scripts into the footer via html:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"><script src="../js/script.js?v=2"></script>
functions.php is firing, but the wp_enqueue_script seems to be failing, so I’ve tried placing into footer.php like so:
<?php wp_register_script('custom_script', get_bloginfo('template_directory') . '/js/script.js', array('jquery') ); wp_enqueue_script('custom_script'); ?>
..to no avail.
In functions.php, also not working:
<?php function load_scripts() { if ( !is_admin() ) { wp_register_script('custom_script', get_bloginfo('template_directory') . '/js/script.js', array('jquery') ); wp_enqueue_script('custom_script'); } } add_action('init', 'load_scripts'); ?>
I can’t imagine it’s a bug or something. I assume I’ve missed a step, and cannot find a solution, can anyone help?
Thanks,