$conf, $runtime; function_exists('chdir') AND chdir(APP_PATH); $r = 'mysql' == $conf['cache']['type'] ? website_set('runtime', $runtime) : cache_set('runtime', $runtime); } function runtime_truncate() { global $conf; 'mysql' == $conf['cache']['type'] ? website_set('runtime', '') : cache_delete('runtime'); } register_shutdown_function('runtime_save'); ?>php - How to make a "page-option" in WordPress|Programmer puzzle solving
最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

php - How to make a "page-option" in WordPress

matteradmin9PV0评论

I had made a WordPress website with my own theme. I have a navigation menu on the top of my website with dropdowns.

Then you click on a page in this menu, I want you to navigate to a page, where there is a specific widget with a navigation...

But, on another dropdown page I want another widget.

So, my question is: "How can I make an "option" to choose the right widget to a specific page?".

I hope someone can help! - thanks.

I had made a WordPress website with my own theme. I have a navigation menu on the top of my website with dropdowns.

Then you click on a page in this menu, I want you to navigate to a page, where there is a specific widget with a navigation...

But, on another dropdown page I want another widget.

So, my question is: "How can I make an "option" to choose the right widget to a specific page?".

I hope someone can help! - thanks.

Share Improve this question edited Feb 28, 2019 at 16:10 Marc 7415 silver badges15 bronze badges asked Feb 28, 2019 at 11:44 Oscar S.Oscar S. 191 gold badge1 silver badge3 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

You can define a specific page template for the specific widget then you can select template page as on your navigation menu.

<?php
/*
Template Name: page one
*/
get_header();
?>

    <div class="main-wrap ">
        <?php
            if (is_active_sidebar( "widgetName" )) {
                dynamic_sidebar( "widgetName" );
            }
        ?>
    </div> 

<?php get_footer(); ?> 
Post a comment

comment list (0)

  1. No comments so far