• Resolved nicgios

    (@nicgios)


    Hi,

    sorry to open another thread but when I put tickets.php (even without) modifications in my theme’s home directory the ticket is splitted into two pages, the QR code occupying the entire second one. I’ve tried to copy in the same dir also /css with all files or to copy /templates/css always in the theme dir but without success.

    WP: 4.6.1
    Theme: Twentyten (yes, an old theme)

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Author Joe Dolson

    (@joedolson)

    Can you share a link? It’s likely that this is a CSS issue, but I’d have to see it to know.

    Thread Starter nicgios

    (@nicgios)

    Hi Joe,
    sorry for the extreme long delay!
    Here it is the link:

    https://www.professeurs-crd-blrscx.fr/?p=871

    I put tickets.php into my theme dir: if I put it into mt dir, no problems…

    Thanks in advance.

    Plugin Author Joe Dolson

    (@joedolson)

    What I actually need is to see a link to a specific ticket, where I can see the QR code; can you provide that?

    Plugin Author Joe Dolson

    (@joedolson)

    Although, with your free test event, I guess I can just purchase one!

    Plugin Author Joe Dolson

    (@joedolson)

    Your custom tickets template doesn’t have a valid CSS stylesheet reference; you’ll need to have a valid stylesheet. You can certainly reference the ones within the My Tickets plug-in, but the paths will have to change if you’re using the stylesheet from elsewhere.

    Thread Starter nicgios

    (@nicgios)

    Thanks a lot Joe!
    I’m really stupid: it was so simple!
    Anyway if I put (in my tickets.php template) something like:

    <link type=”text/css” rel=”stylesheet” href=”<?php echo plugins_url( ‘my-tickets/css/my-tickets.css’, __FILE__ ); ?>”/>

    nothing changes…

    Plugin Author Joe Dolson

    (@joedolson)

    That won’t return a valid URL for the stylesheet; because your tickets.php template isn’t in the My Tickets directory. What’s the context you’re doing this for? Is there any reason you can’t just include the URL for the stylesheet directly?

    Thread Starter nicgios

    (@nicgios)

    Ok, I see, thanks. Now I’m not using ‘plugins_url’ but the path for my stylesheet:

    <link type=”text/css” rel=”stylesheet” href=”MY_PATH”/>

    Anyway, neither the absolute path nor the relative one work… Even if I create a css directory in my theme directory and put the stylesheet inside the answer is always: “URL not found”.

    The curious thing is that if I put

    <link type=”text/css” rel=”stylesheet” href=”css/my-tickets.css”/>

    WP doesn’t find the file and tells me: “The requested URL /css/my-tickets.css was not found on this server”. Is the added “/” the problem?

    Sorry for the very naives questions, I’m going to investigate if WP paths must be set in another way…

    Plugin Author Joe Dolson

    (@joedolson)

    Any path that’s a valid path to the CSS on your server should work.

    <link type=”text/css” rel=”stylesheet” href=”css/my-tickets.css”/>

    That’s a relative link, which means it’s looking for a file in that location relative to the page being viewed, which is unlikely to work.

    Have you tried

    <link type=”text/css” rel=”stylesheet” href=”https://yourdomain.com/wp-content/plugins/my-tickets/css/my-tickets.css”/>

    Thread Starter nicgios

    (@nicgios)

    Dear Joe,
    after several attempts with some WP functions I had already found your solution and I put

    <link type="text/css" rel="stylesheet" href="https://www.professeurs-crd-blrscx.fr/wp-content/plugins/my-tickets/css/my-tickets.css" />

    Which worked: the css is found and correctly loaded, but… (sorry) the QR code remains big (you can try).

    I guess the theme is sort of “overwriting” the plugin’s css. Anyway many thanks for your help!

    Plugin Author Joe Dolson

    (@joedolson)

    You have the main My Tickets CSS enqueued, but that isn’t the CSS used for tickets; it’s used for the cart and button purchase. (And I realize that’s the example I used, so you used it for a good reason…)

    But you should be referencing /my-tickets/templates/css/ticket.css. Sorry – that’s my error in the example.

    Thread Starter nicgios

    (@nicgios)

    Thanks a lot Joe!
    It was soooo simple… and you were so kind: I wish you a happy new year! ??

    nicgios

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Big QR code with tickets.php template in theme home dir’ is closed to new replies.