Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)
  • A plugin (or your ratings template) is wrapping your ratings in divs and therefore displaying them as blocks.

    Add this to your css, it will display it horizontally instead:

    .et_social_media_wrapper {
        display: inline-block;
    }
    Forum: Plugins
    In reply to: [AMP] get_post_meta in amp?
    Thread Starter Jonas

    (@jonaskjodt)

    Hi Oscar, thanks for your response.

    I was using $post->ID instead of get_the_id() for get_post_meta. So the $src should have been $src = get_post_meta(get_the_id(), 'meta-data', true);

    I didn’t notice calling $post->ID inside a loop would be funky making the post meta not showing up. All resolved!

    • This reply was modified 6 years, 10 months ago by Jonas.

    If you’re using this with Buddypress, you could do something like placing the following code in a text-widget in the sidebar/ whatever

    <?php 
    	global $bp;
    	$user_id = $bp->displayed_user->id;
        if ( $user_id != 0 ) {
             _e($points = Badgearoo::instance()->api->get_user_points( $user_id ));	
        } else {
    		_e( 'Invalid member profile.', 'badgearoo' );
    	}
    ?>

    It displays the points for the logged in user and uses Badgearoos api to get it. You can make the WordPress text widgets accept php with

    function php_execute($html){
    	if(strpos($html,"<"."?php")!==false){ ob_start(); eval("?".">".$html);
    	$html=ob_get_contents();
    	ob_end_clean();
        }
    	return $html;
        }
    add_filter('widget_text','php_execute',100);
    • This reply was modified 8 years, 4 months ago by Jonas.
Viewing 3 replies - 1 through 3 (of 3 total)