Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #830329

    Hello,

    At my main site at NowGuide.no I have a Blog Post presenting New Work Positions.
    May I somehow get this Blog Post to show a dynamic value?

    In the post itself, I use a Code Block that catch a dynamic value from a public server.
    In the Code Block Content it is now the following code:

    <script src=”//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js”></script>

    <div id=”a”></div>

    <script>// <![CDATA[
    $.ajax({
    type: “GET”,
    url: “https://tovare.com/api/stillinger&#8221;,
    dataType: “json”,

    success: function (data) {

    $(“#a”).text(data.stillinger + ” open work positions.”);
    },
    });

    // ]]></script>

    The dynamic value is the data.stillinger

    The whole tekst is today like this at the site:
    Main site:
    New Work Positions – Daily Updates
    Our daily recommendation of the today’s Open Work Positions.
    Read more →

    Post:
    Recommendation of the today’s
    14349 open work positions.

    http://nowguide.no/new-open-positions-daily-updates/

    #831704

    Hey Loining,

    Please, may you provide to us your website link and the WP and FTP credentials?

    Best regards,
    John Torvik

    #832021

    Hello,
    I will give you what I have.
    The host is not willing to give me access to FTP.

    #832858

    Hi,

    I’m not sure how if that would work since the content is only written to the database once you press save, I don’t think it would be possible to add dynamic values. What I come to think of off the top of my head would be to use a cron job but that would require a custom solution and would be out of scope of theme support unfortunately.

    Best regards,
    Rikard

    #832893

    Off the top of your head, over the top of my head…
    The web tells me: Cron Jobs are used for scheduling tasks to run on the server.
    You then think I could ever so often write in a new text, – by the help of code – giving the right value into excerpt?
    (Excerpts are optional hand-crafted summaries of your content that can be used in your theme. )

    #833186

    Hi,

    To be honest I’m not sure if a cron-job would work, it’s just something I thought of which might be a possibility. There is no functionality for anything like this is in the theme though, so I’m not sure we can help you out much more with this I’m afraid. I would recommend that you post your plans on a forum like stack-overflow, there are usually someone in places like that who can point you in the right direction.

    Best regards,
    Rikard

    #833459

    Thank you!
    That may be a good help for many of the topics I’m struggling with.

    #833744

    Hi,

    Yes, we can help you out with theme specific problems. Though with more general question about web development your chances of getting high quality answers are higher in places like StackOverflow.

    Best regards,
    Rikard

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.