Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • Thread Starter Grant-Senior

    (@grant-senior)

    And you are right by the way. I did as you suggested and loaded a WP theme and the pages load fine. Cheers.

    Thread Starter Grant-Senior

    (@grant-senior)

    Hi there, thanks for you attention to this.

    And thanks for the heads up. The person responsible for adding that theme is no longer available which is why we’re looking at moving it from the current hosting, and if it’s a paid for theme I guess that’ll explain why things aren’t working on a copied version of the site(?) if the theme is only supposed to work on the particular location.

    Would you mind telling me how you recognized the theme as being the cause for the error please? That didn’t occur to me, like I say, I’m no WP expert, and it would be good to know how to spot it again.

    Cheers

    Thread Starter Grant-Senior

    (@grant-senior)

    Well, I’m doing a different site in WP 3.9.1 and this method for linking images from a post or page no longer works:

    <img src=”[path]/images/whiteLogos/adwords-certified_small.png” >

    Can anybody tell me how to get it working again?

    The following is what I had in the theme functions file.

    function child_shortcode() {
    return get_bloginfo(‘stylesheet_directory’);
    }
    add_shortcode(‘path’, ‘child_shortcode’);

    Thread Starter Grant-Senior

    (@grant-senior)

    This is what I wanted, this has worked in excluding the categories I chose not to display.

    <?php wp_list_categories(‘orderby=name&show_count=1&exclude=66,67,68,69,70,71&title_li=’); ?>

    Thread Starter Grant-Senior

    (@grant-senior)

    Hi there, I’ve just got back to this problem. I’ve tried the Simple Session Support plugin but it didn’t work for me. Here’s how I’ve been doing it just using PHP.

    On the public page header (
    session_start();

    //define variable for detecting which stream user is in
    $siteStream = ‘public’;
    $_SESSION[‘siteStream’] = $siteStream;

    On the generic multi stream page header,
    session_start();
    /* define variable for detecting which stream user has come from which is set in the Public, Media or Profession header */

    if(isset($_SESSION[‘siteStream’]) ) {

    $theStream = $_SESSION[‘siteStream’];

    if ($theStream == ‘public’){
    $theStream = ‘PUBLIC’;
    }
    elseif ($theStream == ‘media’){
    $theStream = ‘Media!’;
    }
    elseif ($theStream == ‘profession’){
    $theStream = ‘professional’;
    }
    else {$theStream = ‘where have I been?’;}

    }

    else {
    $theStream = ‘I don\’t know where I have been.’;
    }

    This works out of the WordPress environment but I can’t get it to work in WordPress.

    Thread Starter Grant-Senior

    (@grant-senior)

    Yes.

    Thread Starter Grant-Senior

    (@grant-senior)

    Nearly. When I leave a public page and go to the fourth page (not media or profession) the fourth page should know where I have been. But it’s always displaying profession. $_SESSION is being set on the other 3 pages, public, media, profession.

    Thanks for your attention to this by the way.

    Thread Starter Grant-Senior

    (@grant-senior)

    Here’s where I have got with this so far – I have 3 pages public, media, profession. Each page states an appropriate $_SESSION as being either

    $_SESSION[‘siteStream’] = ‘public’;
    $_SESSION[‘siteStream’] = ‘profession’;
    $_SESSION[‘siteStream’] = ‘media’;

    On a fourth page I have the following:

    <?php

    session_start();

    //define variable for detecting which stream user is in
    if(isset($_SESSION[‘siteStream’]) ) {
    $siteStream = $_SESSION[‘siteStream’];
    }?>

    And in the page

    <?php echo $siteStream; ?>

    But for some reason it is always giving me ‘profession’ as the output. Can anybody advise as to what I could be doing wrong?

    Thanks in advance.

    Thread Starter Grant-Senior

    (@grant-senior)

    I have 3 pages public, media, profession. Each page states an appropriate $_SESSION as being either
    $_SESSION[‘siteStream’] = ‘public’;
    $_SESSION[‘siteStream’] = ‘profession’; or
    $_SESSION[‘siteStream’] = ‘media’;

    On a fourth page I have the following:

    session_start();

    //define variable for detecting which stream user is in
    if(isset($_SESSION[‘siteStream’]) ) {
    $siteStream = $_SESSION[‘siteStream’];
    }

    And in the page <?php echo $siteStream; ?>

    But for some reason it is always giving me ‘profession’ as the output. Can anybody advise as to what I could be doing wrong?

    Thanks in advance.
    Grant

    Thread Starter Grant-Senior

    (@grant-senior)

    I’ve still not found a solution to this. Can anybody tell me if it’s doable? Or point me in the direction where I may find an answer?

    Thread Starter Grant-Senior

    (@grant-senior)

    Hey Jorgen, and anybody else seeking this info,

    I found another approach to this that has worked and turned out to be a bit simpler, adding the function below to my themes function page allows me to use the shortcode [path] on pages and posts and images are being found. I prefer to use it as it doesn’t require a plugin.

    These are the author of this method’s details for further reference: @author WPSnacks.com @link https://www.wpsnacks.com

    PUT THIS IN YOUR THEMES FUNCTION:

    function child_shortcode() {
    return get_bloginfo(‘stylesheet_directory’);
    }
    add_shortcode(‘path’, ‘child_shortcode’);

    USEAGE ON POST OR PAGE LOOKS SOMETHING LIKE THIS
    <img src=”[path]/images/whiteLogos/adwords-certified_small.png” >

    Thread Starter Grant-Senior

    (@grant-senior)

    This is indeed what was causing the problem. Disabling the Memberpress mod_rewrite rules in .htaccess file has fixed it, PDFs now get found.

    For anybody else wanting to know – The Memberpress mod_rewrite rules are required if one is planning to use MemberPress’ Custom URI rules types to protect standalone files. (in this case I do not require them, don’t know what the solution would be in that case). All of the other Memberpress rules types still work without them.

    Thread Starter Grant-Senior

    (@grant-senior)

    Thanks for your attention PD.

    It looks like the .htaccess reference to the Memberpress plugin I am using is causing a problem. I have contacted the developers to see what they say. Will post further developments, and hopefully the solution.

    Thread Starter Grant-Senior

    (@grant-senior)

    Thanks for you assistance with this Jorgen. I did try the static path name a few times and it didn’t work, I just tried it again and this time it has found the images. I don’t know what has changed, I am positive I had the paths correct before. Oh well, at least it is working now.

    The <?php echo get_template_directory_uri();?> was causing a few other problems too.

    Thread Starter Grant-Senior

    (@grant-senior)

    Well, I just tried replacing the image with itself via the Replace Media plugin I have on the site and this appears to have sorted itself out. I don’t know why it worked, but it has, so I guess there is no longer a problem. I would like to know though if the ‘Attachment Display’ options for thubmnails are supposed to be in the Gallery settings.

Viewing 15 replies - 1 through 15 (of 22 total)