Forum Replies Created

Viewing 15 replies - 46 through 60 (of 61 total)
  • I add a question to this. If a site is deleted from the network, will its ID available for new sites that will be created afterward? Or that ID is lost? Thanks.

    Apparently I’m having a similar problem. So I append myself in here.

    My intention was to redirect a subdomain.com to its brother subdomain.org. So I parked the .com and setup a redirection via cpanel (Hostgator) to the .org.

    Somehow something went wrong, and even if the subdomain.org is working fine, the primary site is broken. When I try to open a post, I’m redirected to subdomain.com – which is quite weird.

    So, since even the (otherwise excellent) Hostgator support couldn’t figure it out how to solve it, I’m rebuilding the whole network (not big deal). But I would really like to ask two things, before to proceed.

    1. Is the WordPress MU Domain Mapping plugin strictly necessary? I’ve read that with WordPress 3.1 is superfluous.

    2. What is the best practice for having a subdoman.com redirect to its counterpart subdomain.org? Setting up a redirect via cpanel, or mapping the two domains to the same subsite and then mapping one of the two as primary?

    Thanks in advance, regards,
    Carlo

    Hello all, and excuse me the intrusion, I got curious about the last comment, as Panda can spot if a parked domain is in fact part of a network. Does that mean that if you host your clients’ websites, Google merges both sites statistic, rank, and such? Thanks in advance and sorry for the OT.

    Thread Starter Carlo Rizzante

    (@carlorizzante)

    I realize I perhaps did not describe the nature of the problem.

    When I open https://carlorizzante.com, I get the correct homepage. Smooth if I wish to open a page, like /about or /contact, no problem there. But when I try to open a post, then I’m redirected on https://lesstools.com, which should redirect to https://lesstools.org, intead. And it does not.

    I don’t understand why that parked domain breaks my primary site.

    On the other hand, all the subdomains still behave nicely, for what I can tell. So https://lesstools.org still loads fine (it’s broken since I’ve just moved and lost one or two files, no big deal, and not related problems with the broken redirection).

    Thanks again for your consideration,
    Carlo

    Thread Starter Carlo Rizzante

    (@carlorizzante)

    Thank you very much!

    So, if I’m on the right path, the code below should be just fine (and indeed it works smoothly)

    [Code moderated as per the Forum Rules. Please use the pastebin]

    My regards ??

    Thread Starter Carlo Rizzante

    (@carlorizzante)

    To be more precise, the following works:

    $theme_path = TEMPLATEPATH . '/library/theme/';
    include_once( $theme_path . 'theme-init.php' );

    …and…

    $js_path = get_bloginfo('template_directory') . '/library/js/';
    print "<script type='text/javascript' src='" . $js_path . "less-1.1.3.min.js'></script>\n\n";

    Hope this way is more clear.

    Thread Starter Carlo Rizzante

    (@carlorizzante)

    Nope,
    the path is correct only if I use TEMPLATEPATH for $theme_path and get_bloginfo( ‘template_directory’ ) for $styles_path. This cos I need those variables to later load other files.

    If I use get_stylesheet_directory() I obtain an incorrect path.

    Now, the point here is to understand where TEMPLATEPATH, get_bloginfo( ‘template_directory’ ) (and get_stylesheet_directory() ) vary, since I need those variables to retrieve later files.

    Later I need to use

    include_once( $theme_path . 'theme-init.php' );

    …and later again

    print "<link rel='stylesheet/less' id='style-less-css'  href='" . $styles_path . "style.less' type='text/css' media='screen, projection' />\n";<br />
    print "<script type='text/javascript' src='" . $js_path . "less-1.1.3.min.js'></script>\n\n";

    So, TEMPLATEPATH works with include(), get_bloginfo() works later with print()… and I get confused.

    If I use TEMPLATEPATH to retrieve all the variables, I get broken links for style.less and the less.js. If I use get_bloginfo(‘template_directory’) or get_stylesheet_directory() for all of those, I get broken links for the stylesheet and the js file.

    In details, TEMPLATEPAH returns

    src='/Users/carlorizzante/Documents/myProjects/mamp/htdocs/mariakosh/wp-content/themes/mariakosh/library/js/less-1.1.3.min.js'

    …while get_bloginfo(‘template_directory’) returns

    src='https://localhost:8888/mariakosh/wp-content/themes/mariakosh/library/js/less-1.1.3.min.js'

    …and get_stylesheet_directory()

    src='/Users/carlorizzante/Documents/myProjects/mamp/htdocs/mariakosh/wp-content/themes/mariakosh/library/js/less-1.1.3.min.js'

    So, my question is, what’s exactly the difference between TEMPLATEPATH and other ways to retrieve paths to files?

    Thread Starter Carlo Rizzante

    (@carlorizzante)

    Thank you Esmi,
    but if I use get_stylesheet_directory() I get a 404 error.

    A note, right now I’m working on a local environment, and my purpose would be to have a method valid in local as well when I deploy the website online.

    Thread Starter Carlo Rizzante

    (@carlorizzante)

    Hi again!
    I tried with the suggestion,

    $post = $temp and then $temp = $post, with no success. I tried adding wp_reset_query(); and wp_reset_postdata();.

    Nothing… the comments still got messy. All the above were superfluous, since the problem was here:

    foreach( $posts_lot as $post ) { ...

    So now is something like:
    foreach( $posts_lot as $post2 ) { ...
    …I still have to decide how to call it.

    And it works fine. For now ??

    Thanks for the support, anyway! Ciao!

    Thread Starter Carlo Rizzante

    (@carlorizzante)

    Well, I omitted the arguments I pass to the query, but I guess it’s not the critical point. Anyway the whole function to fetch similar posts is published here:
    https://carlorizzante.com/2011/08/list-similar-posts-a-very-simple-functionality-plugin-for-wordpress/
    …and sure thing I would like it to work with no trouble for who eventually decides to implement it.

    Thread Starter Carlo Rizzante

    (@carlorizzante)

    It makes sense and it’s probably the problem. I added wp_reset_query(); but with no luck.

    This the part of the code that fetches the query.

    $rand_posts = get_posts( $query_args );
    wp_reset_query();

    Is it the wrong way to operate a query beside the main loop?

    Also, I keep the comments outside the loop, after endwhile;

    If I skip the whole code for listing similar post, the comments are just fine.

    Thanks for your help, ciao!

    Forum: Plugins
    In reply to: iSlidex, timthumb, 777
    Thread Starter Carlo Rizzante

    (@carlorizzante)

    Hallo again,
    I still did not quite get what exactly stop timthumb.php (provided by iSlidex) to work properly, but I solved the issue changing a line in the file islidex.php:

    define ('ISLIDEX_PLUGIN_JS', ISLIDEX_PLUGIN_URL ."/js");

    in…

    define ('ISLIDEX_PLUGIN_JS', get_bloginfo('template_directory') ."/scripts");

    So that directing iSlidex in using timthumb.php that I use for other purposes in the layout of the website.

    This way I’m exposed at errors while updating, but I could not find an other solution. Changing the permission settings in 777 or 755 (even among all the website, not just the cache folder) did not produce results.

    Ciao!

    Yeah, it works fine, it seems to me.

    Thank you very much!

    Hi!
    I have the same problem (rollover on Thumbnails in WP 2.9x), coding a website where the thumbnails are used to list the posts from the home page or archive pages. It would be great to be able to set some kind of rollover, so that when the user pass over the thumbnail the image changes.

    Thank you in advance for any suggestions. I’m trying to solve the problem with jQuery or CSS but I’m a bit confused, ‘cos it would be also very useful to find a simple way, so that not-technical customers will be able to do themselves.

    Ciao!
    Carlo

    By the way, “exclude” works fine in the Gallery short code. Well, at least in my case.

Viewing 15 replies - 46 through 60 (of 61 total)