You get an error because it’s looking for function named as set_default_page_template
while you seems to have function named set_page_template_default
.
I’m not sure you either don’t have a function named set_default_page_template
or you later renamed it. but that’s the error. WP cannot find your hook because it doesn’t exist.
you should either rename your set_default_page_template
to set_default_page_template
(if this is the function what you need) or you should create a new function and name it as set_default_page_template
Related Posts:
- Theme not calling Jquery properly
- Function to return true if current page has child pages
- Proper use of Output Buffer
- List of all theme customizer control types?
- Need help setting default setting value for radio button in theme customizer
- function_exists call in function.php
- Is it possible to get a theme customizer setting from wp.customize using jquery?
- Debugging an error: wp_enqueue_style was called incorrectly
- Change the footer text on the login page
- How to remove a metabox from menu editor page?
- How to get the registered sidebar’s name by its id?
- Set the transport of the Customizer ‘header_image’ core setting to ‘postMessage’
- Dynamically change feature image in customiser
- One button to change all settings in theme customizer?
- Check if page parent has certain template
- Hide a menu-item and its submenus and display a ‘Log in’ link if the user is logged out
- The best way to customize “nav-menu-template.php” to add if the ‘link_before’ is “checkbox”
- Design view breaking on Pages
- Understanding WordPress child theme custom JS loading
- How can I loop into two different DIVS without repeating the DIVs
- Removing unnecessary wordpress files
- Hooking new functions to actions + passing parameters
- Remove css styles from specific page
- Is $hook a global variable in WordPress
- Is the regular ajax request method safe or I should use admin-ajax.php?
- How do I list the_tags() into HTML data-attribute
- Can I change a variable in a content part while calling it?
- How to make thumbnail image fit into a div where image dimentions are completely different?
- Insert all post IDs in new database table
- Custom Logo URL | Help me print the URL of the custom logo I inserted into my theme
- What is the fastest way to load PHP functions that are only used in one theme template?
- My Own layout in WooCommerce pages [closed]
- Differences when using the the_time and the_date functions
- using add_action for a header hook that has an additional parameter
- Can’t load WP function into external function
- Set WordPress Default Template
- Randomise upload filenames (or another solution to hide the original image URL from theft?)
- Handling Body class based on Template
- Trigger popup in a php if/else statement
- How to load a template-part based on a url wildcard?
- Create another “Display Site Title and Tagline” checkbox, “Header Text Color” setting and control
- Converting HTML Template to WordPress Theme
- How to remove the cufon script from Dzonia Lite theme [closed]
- How do I add custom bulk actions to multiple custom post types?
- what is the best practice to add new field to an api route
- Woocommerce: hook action/filter I could use to add variation id and price with each attribute opt on WooCommerce Rest api
- Why ajax doesn’t work on certain wordpress hooks?
- Is it possible to intercept all ajax requests and get the parameters and the returns?
- WordPress Gravatar filter is removing my custom attributes
- Generating an nonce for Content Security Policy and all scripts – How to make it match/persist for each page load?
- Return a numerical function value in Customizer controls
- Populate editor with some content of a page with a page template
- Catchable fatal error: Object of class stdClass could not be converted to string after WP 4.7
- Modify custom field input data before creating a new post
- how to make custom ajax handler?
- Compare the old get_theme_mod($name) to the new get_theme_mod($name) return value
- Skt full width basic slideshow problem
- How to disable controls in theme customizer?
- How do I link a button I created in theme customizer to a function?
- Trying to retrieve post meta
- Is there a way to conditionally check whether a WordPress post title is empty?
- Is the “_s” on this `sprintf(__(‘Page %s’, ‘_s’), max($paged, $page))` just refer to a text domain?
- How to remove woocommerce_breadcrumb() from do_action( ‘woocommerce_before_main_content’ ); [closed]
- WordPress admin-ajax.php
- Use .php file as page instead of wordpress page & template file?
- Use WordPress function in php file
- How to obtain the current website URL in my theme?
- What exactly do this function declared into functions.php file of a WP theme?
- Omit custom post type from wp-sitemap.xml based on meta key using wp_sitemaps_posts_query_args
- Run a code only on theme activation only during first activation
- How to call multiple functions from multiple files into a WordPress page template [closed]
- get_template_directory adding FTP root folders in urls
- What is the best way to define constant options for a theme?
- WordPress redirect redirecting too many times or not at all
- Why does the post_type_link hook everything twice?
- How to make function appear in sentence?
- Getting page / post URL on publish and / or update
- Fatal error when using array_diff() function inside of wp_update_nav_menu hook?
- Theme editing “post thumbnail” help
- Why transition_post_type hook is called twice for the same post?
- Where can I find the declaration of `$_wp_theme_features`?
- Calling PHP function doesn’t work in index.php
- Extend the WP_Customize_Image_Control class to change its non-frame $button_labels
- A Customizer checkbox control that sets the setting to “” or to “blank” and show() or hide() a color control
- My customizer’s setting doesn’t set to the default and needed to click the control’s “Default” button before it’ll be set
- Save the outputted image into the Media Library, with a different filename and extension
- WordPress get_post_meta issue
- WordPress HTML Helper
- WordPress causing all code to be displayed on line 1. Receiving multiple errors after cleaning cookies and cache
- How to add button to top of theme customizer?
- Adding code to the function file
- Adding php within a return statement [closed]
- I need a button to appear when not loged in and another when logged in, I need help fixing code PLEASE!
- Load slideshow.css file only if Slideshow is checked / on
- How can I fix my pagination?
- Assign new post author IF another user in custom field on post transition
- Create and publish a new post every Monday, listing the post titles and links to the posts published during the previous week
- transition_post_status hook, works – but not if the post is new
- Is there a hook that I can use when a fatal error occurs?
- require used as a function to load theme dependencies?