• Resolved zunkytro

    (@zunkytro)


    Hi,

    In a WP article, there is one bloc which displays a specific php file (called: page1.php)

    I would like refresh this bloc (by refreshing page1.php) without refreshing the complete article (full page).

    I would like this action to be displayed by pressing a button.

    <script>
    function myFunction() {
    $('#load_me').load("page1.php");
    }
    </script>
    <button onclick="myFunction()">Cliquez moi</button>

    I’ve tried to build this script but it doesn’t work… could you help me please?

    • This topic was modified 6 years ago by zunkytro.
Viewing 16 replies (of 16 total)
  • Moderator bcworkz

    (@bcworkz)

    That’s strange how your posts keep getting caught by the filters. The filters are a sort of AI and no one really knows why they do things. They were trained to flag spammy posts by showing them many thousands of known good and bad posts. I don’t see why they would think your posts are spammy.

    There is a lot of theme code that is required to provide basic functionality that never really varies and is quite tedious and boring to code. A lot of devs prefer to skip over this portion by building from a generic starter theme. There are a number available. I like to start with the “_s” (underscore S) starter theme. If nothing else it could serve as a guide to what constitutes basic functionality. I like starter themes because then I can focus on developing the look and feel of my theme and not spend time writing generic, common code.

    For general documentation of what goes into a theme, I suggest you start with the Theme Handbook.

Viewing 16 replies (of 16 total)
  • The topic ‘JS refresh specific page.php’ is closed to new replies.