610m
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Track Author Stats (# of pageviews)UPDATE:
I’ve found these two articles: https://www.wheresitworking.com/2010/02/08/tracking-authors-in-wordpress-with-google-analytics-event-tracking/
https://www.marketingtechblog.com/wordpress/tracking-multiple-authors-google-analytics-wordpress/
I just tried the first one and I’ll have to wait and see if it works.
Forum: Fixing WordPress
In reply to: Track Author Stats (# of pageviews)Nope, nothing. I think that something could be done with Google Analytics if you are handy with their custom filters but I can’t figure it out. It baffles me that there’s nothing like this for WP.
Forum: Requests and Feedback
In reply to: Version 3.0 FeaturesSince this release is going to integrate WPMU which is more community focused, I think the other major feature should be built in Twitter, OAuth and Twitter connect login support.
Forum: Plugins
In reply to: Shortcode is displaying in the wrong placeI found a solution that works. I don’t know why it works but it does:
function include_file($atts) { //check the input and override the default filepath NULL //if filepath was specified extract(shortcode_atts(array('filepath' => 'NULL'), $atts)); //check if the filepath was specified and if the file exists if ($filepath!='NULL' && file_exists(TEMPLATEPATH.$filepath)){ //turno on output buffering to capture script output ob_start(); //include the specified file include(TEMPLATEPATH.$filepath); //assign the file output to $content variable and clean buffer $content = ob_get_clean(); //return the $content //return is important for the output to appear at the correct position //in the content return $content; } } //register the Shortcode handler add_shortcode('include', 'include_file');
To call the file:
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. [include filepath="/SomDirectory/MyIncludedFile.php"] Duis libero orci, pretium a, convallis quis, pellentesque a, dolor.
Found it here: https://www.amberpanther.com/knowledge-base/using-the-wordpress-shortcode-api-to-include-an-external-file-in-the-post-content/
@qwik3r Thanks for the response. I haven’t had a chance to check that out yet. Hope the solution I found helps you.
Forum: Plugins
In reply to: Shortcode is displaying in the wrong placeI’ve also tried this but it didn’t work:
function inline() { $output = include ( TEMPLATEPATH . '/inline.php' ); return $output; } add_shortcode('in', 'inline');
Forum: Plugins
In reply to: Shortcode is displaying in the wrong placeI forgot to mention, that when it the shortcode return to the top of the post, it puts the number “1” in the place where the shortcode is supposed to return.
Forum: Fixing WordPress
In reply to: shortcode output always appearing at top of page contentI have a similar problem and can’t find an answer but in my travels I think I found the answer to yours… You cannot use “echo” in a shortcode fucntion, you must use “return”. Everyone else that I’ve seen use this has their problem resolved when they stop echoing and start returning.