i'm hoping someone can point out whats going wrong with this WordPress theme. I didn't build the theme, though I know its using Genesis.
http://bloomfire.staging.wpengine.com/partners-new
The issue is on the Referral Partners option (if you click on it, it displays a different tab essentially. But if you scroll down you will see that the tab isn't displaying the shortcode, which is just a simple contact form from Gravity Forms.
I have tried adding in the following code to the functions.php file but it has just been ignored all over:
add_filter( 'comment_text', 'shortcode_unautop');
add_filter( 'comment_text', 'do_shortcode' );
global $post;
$content = get_post_meta( $post->ID, 'solution-tab-3', true );
echo do_shortcode( $content );
add_filter( 'get_post_meta', 'shortcode_unautop');
add_filter( 'get_post_meta', 'do_shortcode');
I don't understand how Genesis isn't allowing a shortcode to be used within the system.
Can anyone help?
Related
The following is output by a third party plugin, to modify the features image on posts.
function my_update_featured_image( $html, $post_id, $attachment_id ) {
return customgeneratedimg( $html, 'post_thumbnail_html', $attachment_id );
}
add_filter( 'post_thumbnail_html', 'my_update_featured_image', 10, 3 );
I've tried adding the following in order to remove it, but it's not working, with no change the third party plugins featured image modifications. The below was added to my themes functions.php file.
remove_filter( 'post_thumbnail_html', 'my_update_featured_image', 10, 3 );
As it's a features image on upload maybe I should call it early. Any thoughts on how to address this?
Notes:
the function above is not part of a class
the function above modifys the file format of a featured image after uploading
(Sorry for my bad english, I'm french)
I would like to add PHP code in category/tags description field (Wordpress).
What can I add in my functions.php file ?
In fact, I would like to run shortcodes inside this field. So I put this code in my functions.php :
add_filter( 'term_description', 'shortcode_unautop' );
add_filter( 'term_description', 'do_shortcode' );
remove_filter( 'pre_term_description', 'wp_filter_kses' );
remove_filter( 'term_description', 'wp_kses_data' );
It works with some shortcodes, but not all. So I would like to try this :
<?php echo do_shortcode('[myshortcode]'); ?>
But PHP can't run in description field of category and tag pages.
Thank you very much for your help
I'm developing a wordpress theme and for some reason, my woocommerce single-product is broken. It displays everything it's suppose too but it looks like css and javascript aren't working.
I already added woocommerce support in my function files.
If I change to twentyfourteen theme, then single-product is working normally.
Can somebody help me out?
Here's the link for the single product page:
Link
WooCommerce classes are not loading on your web page. If you already added WooCommerce theme support, then you might missing WordPress body function.
Make sure you have following line in functions.php
add_theme_support( 'woocommerce' );
Also include WordPress's body function, <body> tag must be like below.
<body <?php body_class() ?>>
If you already have any class for body, pass that class to this function like
<body <?php body_class( 'existing-class' ) ?>>
To enable WooCommerce gallery features in your theme you must declare support using add_theme_support() like so;
add_action( 'after_setup_theme', 'yourtheme_setup' );
function yourtheme_setup() {
add_theme_support( 'wc-product-gallery-zoom' );
add_theme_support( 'wc-product-gallery-lightbox' );
add_theme_support( 'wc-product-gallery-slider' );
}
More Info here
I've been trying to get a shortcode to work in my post titles on wordpress however the usual method isn't working.
The theme is using 'entry-title' but i can't find the correct tag to use.
So far i've gone with:
function myshortcode_title( ){
return get_the_title();
}
add_shortcode( 'page_title', 'myshortcode_title' );
and i've also used...
add_filter( 'the_title', 'do_shortcode' );
Neither them are working and when i change 'the title' to 'entry-title', still no success
Any other ideas?
Thanks
I dont think this will work
add_filter( 'the_title', 'do_shortcode' );
You are calling do_shortcode need to be a call back and not a shortcode
So make a call back function instead and in the call back function do
echo do_shortcoe
that will work
I need to change the link for the "Continue Shopping" button in Wordpress WooCommerce. I have tried 6 different solutions that I found online, all of which involved editing the functions.php file using the hook woocommerce_continue_shopping_redirect.
None work and I have seen a few unanswered posts around the web with the same issue, which leads me to suspect that something has changed in the latest version of WP or WC.
Any ideas would be appreciated. Thanks.
You may try add below code into your theme functions.php:
function custom_woocommerce_continue_shopping_redirect( $return_to ) {
return get_permalink( woocommerce_get_page_id( 'shop' ) );
}
add_filter( 'woocommerce_continue_shopping_redirect', 'my_woocommerce_continue_shopping_redirect', 20);