Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter ducknet

    (@ducknet)

    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' );
    Thread Starter ducknet

    (@ducknet)

    This is perfect and I learned a lot from your code.

    Thank you so much!

    Respect,
    Colin.

    Thread Starter ducknet

    (@ducknet)

    WOW.. 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!

    Thread Starter ducknet

    (@ducknet)

    UPDATE:

    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.]

    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]

    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

Viewing 6 replies - 1 through 6 (of 6 total)