Annoying notification when trying to create a new page
This notification is added by your theme. You can remove the upsell notices for this theme by hooking into the ttfmake_is_plus filter: add_filter( ‘ttfmake_is_plus’, ‘__return_true’ );
This notification is added by your theme. You can remove the upsell notices for this theme by hooking into the ttfmake_is_plus filter: add_filter( ‘ttfmake_is_plus’, ‘__return_true’ );
Use the Post Object instead. When in the loop, do this: global $post; echo $post->post_name; That should do the trick.
The publish_page action is listed as deprecated. You can use the ‘transition_post_status’ hook to check if a page was published. function publish_page_interception( $new_status, $old_status, $post ) { if ( ($new_status != $old_status) && ($post->post_status == ‘publish’) && ($post->post_type == ‘page’) ) { if($post->post_parent > 0) { //do stuff } } } add_action( ‘transition_post_status’, ‘publish_page_interception’, 10, … Read more
$mypages = get_pages( array( ‘parent’ => get_the_ID(), ‘sort_column’ => ‘ID’, ‘sort_order’ => ‘ASC’, ); foreach( $mypages as $page ) { // Modify this line to include ID of page where want to change the link if ($page->ID == $ID_OF_PAGE_THAT_SHOULD_BE_PDF_LINK) { // Modify this line to include your PDF link echo ‘<li><a href=”https://wordpress.stackexchange.com/questions/154920/YOUR_PDF_LINK_HERE”>’ . $page->post_title . … Read more
If I understand correctly what you want, you want a ‘page in a page’. This is very easy. Just use this plugin. It has support for widgets and shortcodes. Especially the shortcodes will be interesting for you. The plugin description repeats that it’s mission is to bring your Facebook posts and Twitter feeds to your … Read more
To expand upon my comment: Top-level page? (q.1) global $post; $x = get_ancestors( $post->ID, ‘page’ ); if( ! $x ) { // there are no ancestors, therefore this is a top-level page } Childless page? (q.2) global $post; $args = array( ‘post_parent’ => $post->ID, ‘post_type’ => ‘page’, ); $x = get_children( $args ); if( ! … Read more
Like the front-end in WordPress, the admin pages have various css classes added to the <body> tag. You could use: body.post_type-page .fun-stuff-here { color:aqua; } Keep your action the same – the CSS will be loaded everywhere on admin, but only becomes relevant in the Pages section. (There’s a post_type-… for each.)
What about admin_init ? Description is: admin_init is triggered before any other hook when a user accesses the admin area. This hook doesn’t provide any parameters, so it can only be used to callback a specified function.
For your authors you need to set accounts with a “contributor” role. A contributor can writ content but can’t publish it. Then create a user for your editor and give him an “editor” role and he will be able to publish the content the authors had written. The main problem you may run into is … Read more
The TypeError: wp.Uploader is undefined error is coming, because wp media editor file is not included. Please check for this.