ducknet
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Adding a href image to my shortcode title??Haha.. I got it to work… For those who may struggle with this, use single quotes and then put your double quotes in normal, like this… As a separator, don’t use a comma, but a period!
function myshortcode_title( ){ $title = get_the_title(); $id = get_the_ID(); $url = ('<a href="file:///Guru/'.$id.'.m3u"><img src="http://ducknet.me/guru/play.png"></a> '); return $url.$title; } add_shortcode( 'page_title', 'myshortcode_title' );Forum: Fixing WordPress
In reply to: How do I remove the last comma in a loop output?This is perfect and I learned a lot from your code.
Thank you so much!
Respect,
Colin.Forum: Fixing WordPress
In reply to: Custom taxonomies for current postWOW.. I FIGURED IT OUT!
function get_actors( ){ return get_the_term_list( $post->ID, 'post_tag', '', ', ', '' ); } add_shortcode( 'get_actors', 'get_actors' );[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
This is all you need if you are stuck on this too. I’m hoping I can change post_tag to any taxonomy, but I guess I’m about to find out!
Forum: Fixing WordPress
In reply to: Custom taxonomies for current postUPDATE:
I used the following code;
function get_actors( ){ $my_terms = get_the_terms( $post->ID, 'post_tag' ); if( $my_terms && !is_wp_error( $my_terms ) ) { foreach( $my_terms as $term ) { return $term->name; } } } add_shortcode( 'get_actors', 'get_actors' );This returns the first tag (I used tags for actors) but it is not hyperlinked. How do I loop to get them all and make them hyperlinked?
Thanks,
Colin.[Moderator Note: Please post code & markup between backticks or use the code button. Your posted code may now have been permanently damaged by the forum’s parser.]
Forum: Networking WordPress
In reply to: The requested URL /wp-admin/ was not found on this server.Thanks Ipstenu – I copied the code directly from the wordpress [network setup] text box – how could that be wrong? I also tried deleting the rest of my htaccess code in case it was causing some kind of conflict but to no avail.
My .htaccess currently contains the following code; – any ideas??
# protect the htaccess file <files .htaccess> order allow,deny deny from all </files> # disable the server signature ServerSignature Off # limit file uploads to 64mb LimitRequestBody 64240000 # protect wpconfig.php <files wp-config.php> order allow,deny deny from all </files> #who has access who doesnt order allow,deny #deny from 000.000.000.000 allow from all #custom error docs ErrorDocument 404 /notfound.php ErrorDocument 403 /forbidden.php ErrorDocument 500 /error.php # disable directory browsing Options All -Indexes RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L] # add a trailing slash to /wp-admin RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*) $1 [L] RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L] RewriteRule . index.php [L]Forum: Networking WordPress
In reply to: The requested URL /wp-admin/ was not found on this server.Same problem here, the new site shows like html and not php and can’t find wp-admin either.
The main site still shows fine and permalinks seem to work (both old links and the new blog/oldlink too)
Please help