Forum Replies Created

Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter colingoldbergatmacmicro

    (@colingoldbergatmacmicro)

    I have re-written the post to be more clear. Here’s the re-write:

    I need my plugin to generate the following – once per page:

    <script type="text/javascript" src="https://<ritc url for js file>"></script>
    <script type="text/javascript">
    ritc.initialize('63864593a4153879');
    </script>

    The purpose of this is to allow one or more shortcodes – all requiring the same initialization – to be on a page. I can use wp_enqueue_script() in the shortcode function – this works for the first line ie.

    <script type="text/javascript" src="https://<ritc url for js file>"></script>

    But how do I generate the next lines to follow – and only once on the page? ie.

    <script type="text/javascript">
    ritc.initialize('63864593a4153879'); (one line within script tags)
    </script>

    Is there anything like wp_enqueue_script() but which takes a string instead of a url? The string would be the one-liner above. Not to forget the dependency on the first line above.

    Or should I just generate the javascript from the shortcode function, managing it so it only appears once in the page? (How do I do this? Is there a global variable I can use?)

    Or is there another approach to doing this?

    Thanks in anticipation.

    Colin G

    Thread Starter colingoldbergatmacmicro

    (@colingoldbergatmacmicro)

    I finally found the cause of this problem. It was the All in One SEO Pack plugin.

    I found this out as I went through these steps:
    – upgraded to Thesis 1.8.5 – successful but content still not showing
    – upgraded to WordPress 3.4.1
    – in the process I had to deactivate all the plugins (along with database backup etc.)
    – upgrade successful, and I saw that the site was up immediately (before I activated the plugins) – all content was being displayed
    – activated the plugins, and found that the content once again disappeared
    – starting at the top of the list, deactivated plugins and checked the site after each one. Luckily, All in One SEO Pack was near the top of my list.
    – Voila! – all is back to ‘normal’

    This behavior – of not showing content – is only recent (within the last week – not sure exactly when). I have had the All in One SEO Pack active for some time – until this morning.

    I hope my experience helps anyone else with a similar problem.

    CG

    Thread Starter colingoldbergatmacmicro

    (@colingoldbergatmacmicro)

    I switched to the original theme and the content for the pricing page showed – even as the styling was all wrong (missing or different stylesheet?).

    I then switched back to thesis and the content for the pricing page does not show.

    Does this mean definitively that this is a thesis issue? Perhaps a thesis file got corrupted.

    As I have thesis 1.8.2 and the latest version is 1.8.5, I will upgrade and see if this changes anything. If you have any thoughts on this, please let me know.

    Thread Starter colingoldbergatmacmicro

    (@colingoldbergatmacmicro)

    I should have previewed my post – my apologies again.

    To be absolutely clear: I can successfully bring up the content for the pricing page in the editor – it has not disappeared. Even after clicking Update (with no changes made), and then refreshing the pricing page on the site, the content for the pricing page does not show.

    Thread Starter colingoldbergatmacmicro

    (@colingoldbergatmacmicro)

    Thanks for your response. Sorry I forgot to say it before – the pages seem to be there (in the editor). I have just (again) brought up the pricing page in the editor and clicked Update. It still does not show the page content.

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