Forum Replies Created

Viewing 15 replies - 16 through 30 (of 33 total)
  • Thread Starter zadok22

    (@zadok22)

    Thanks Marventus

    I will test this later tonight. I will be in touch!

    appreciated

    Thread Starter zadok22

    (@zadok22)

    Got it. Sorry I was so slow there, for I was not seeing how to inject that, but now I see that I don’t have too. That’s a relief! I am great with HTML and CSS, but js, action-scripting and .php are different animals.

    So for clarification:

    • I need both the last code you wrote in js fiddle and the code from my client?
    • Or just the code you wrote with the data of task orders (if available)?

    Also, how can we ensure that the closing tags don’t crash my site (I don’t see on the custom_functions.php editor for Thesis any closing tags, so should I worry about that?)

    Thread Starter zadok22

    (@zadok22)

    Nevermind the second paragraph of what I said, just the first is my concern. I re read your post.

    All very much appreciated . Thanks!!!

    Thread Starter zadok22

    (@zadok22)

    I just want want to know where in WP do i add the body class code, because i cant just add it to the page in html. Because if I click on the text editor within WP, it is not giving you all of the HTML. So where do I add or adjust the “body” tag to be “body class” with the extra code? Are you understanding what I am trying to do here? (unless WP allows you to get at all the HTML it writes and I am not seeing it) I need to be able to do this before I can add the function js code to .php that you wrote.

    Second, they way you had the code before is what I need saying “No Task Orders as of [today’s date]”

    Thread Starter zadok22

    (@zadok22)

    No I understand what the body tag is and does, but what is the most effective way to change the body class to the code you wrote?

    <body class=”navy-seaport-e”>
    <div class=”left”>
    <p>Task Orders exist:</p>
    <select id=”list1″>
    <option value=”default”>Seaport-e Task Orders – CLick to select</option>
    </select>
    <p>No Task Orders:</p>
    <select id=”list2″>
    <option value=”default”>Seaport-e Task Orders – CLick to select</option>
    </select>
    </div>
    </body>

    I know for the function code you wrote, I use custom_functions.php to implant it. If this was a static site adjusting this code would be a piece of cake, but what is the best way to alter the body text code (not CSS) in WP and Thesis? How do you integrate that html code in WP and Thesis?

    Thread Starter zadok22

    (@zadok22)

    So Marventus, what is the most effective way to add that body class tag in WP using Thesis? How would you go about adding it?

    Also, I know we change the opening body tag, but should we include the closing body tag since their is more in the body than just this script?

    I want to get this part straight before I add the js to the Custom_functions.php

    Thx

    Thread Starter zadok22

    (@zadok22)

    Yeah I guess you have it correctly. It would probably be “TO- NUMBER” for different task orders coming through.

    I am excited to try this. Will be out of the home for a while and will be back in the afternoon to test.

    Thanks
    PS: we have to be there if not getting a lot closer

    Thread Starter zadok22

    (@zadok22)

    Certainly.

    On the https://www.silverrhino.com/navy-seaport-e/ page, under the large ship and sub picture and under the four listed anchors is a drop down menu. It says viewable on the button “(SeaPort-e Task Orders – Click to Select)”. If you click that button to see if there is any task orders, only one option (or option 1) displays saying “No Task Orders as of May 24th 2012″… The client wants this to read with the current date if no task orders are actually ready saying for example: “No Task Orders as of July 19th 2012”

    Thread Starter zadok22

    (@zadok22)

    For some reason it crashes the site and I have to reload the “custom_functions.php file to revive the site. I really appreciate the help. I know this is turning out to be areal mystery.

    I am going to add all of what the client gave me and what he si trying to accomplish. You probably already know this, but here it goes:

    If you put this in the <head> section:

    <script type="text/javascript" language="javascript">
            function setSPETODate() {
            var dt = new Date();
            var dtStr = (dt.getMonth() + 1) + '/' + dt.getDate() + '/' + dt.getFullYear();
            document.getElementById("listSeaPorteTaskOrders").options[1].text = "(No Task Orders as of: " + dtStr + ")";
            }
        </script>

    And change the <body> tag to this:

    <body class="custom navy-seaport-e" onload=”setSPETODate()”>

    the dropdownlist will always display the current date for option 1 (until we actually can change the list to a TO identifier):

    This is what is suppose to take place with that page: https://www.silverrhino.com/navy-seaport-e/

    Thanks in advance for any help.

    Thread Starter zadok22

    (@zadok22)

    Ok I reloaded it all, and the body class is showing:

    <body class=”custom navy-seaport-e”>

    . Not sure what i did to change that. But nevertheless, still nothing has changed

    Thread Starter zadok22

    (@zadok22)

    How would you go about editing the body class tag that I have listed twice? This is such a mystery in WP and Thesis, though I apparently did do it before.

    Also, in the function code that you have instructed me to add above, I assume it is with removing the previous function that was given before, Is that correct?

    // Add custom class to home page
    function my_class_names($classes) {
    if ( is_page(ID_NUMBER_GOES_HERE) ) {
    $classes[] = ‘custom navy-seaport-e’;
    }
    return $classes;
    }
    add_filter(‘thesis_body_classes’,’my_class_names’);

    Thread Starter zadok22

    (@zadok22)

    Hey Marventus, sorry i was away on vacation.

    I did all of the above to the T, but still nothing has changed.

    Thread Starter zadok22

    (@zadok22)

    So the original body tag code to be inserted was:

    <body class=”custom navy-seaport-e” onload=”setSPETODate()”>

    How do I insert this to the navy seaport-e page?

    Thread Starter zadok22

    (@zadok22)

    Ok Marventus, so I added the way you said into the custom_functions.php: it looks like:

    // Add custom class to home page
    function my_class_names($classes) {
    if ( is_page(32) ) {
    $classes[] = ‘custom navy-seaport-e’;
    }
    return $classes;
    }
    add_filter(‘thesis_body_classes’,’my_class_names’);

    However, it is still not working to produce the current date. Here is the link if you want to inspect: https://www.silverrhino.com/navy-seaport-e/

    Thread Starter zadok22

    (@zadok22)

    Thanks for getting back so quickly. Sorry to cut into your Holiday. I will do this soon and get back wit the results. Thx

Viewing 15 replies - 16 through 30 (of 33 total)