New answers tagged

0

By removing the capability of deleting published pages and publishing pages, I have effectively stopped the admin from creating or deleting anything that is on the website. $role = get_role('administrator'); $role->remove_cap('delete_published_pages'); $role->remove_cap('publish_pages');


0

Adminimize does not REMOVE menu items etc, it just keeps them VISUALLY HIDDEN. So, your admin pages still exist. Add this code to your functions.php file- add_action('admin_menu', 'edit_trustees_page'); function edit_trustees_page() { global $submenu; $trustees_page_id = 1; //change this value $url = get_admin_url() . 'post.php?post=' . ...


0

http://wordpress.stackexchange.com/a/199997/86773 As the advice suggested here, switching my hook to "wp" instead of "init" allowed me to make the page comparison I wanted using is_page().


0

Have you tried get_the_ID function? Try this one to get the ID and after that you can get all the info you want. Does it help?


1

I use the following for multiple post types, just replace foo and bar with your own post types: $args = array( 'post_type' => array( 'foo', 'bar' ), 'orderby' => 'post_date', // other parameters as needed ); $q = new WP_Query( $args ); if ($q->have_posts()) : while ...


0

If achieving this with a plugin is acceptable to you, an answer to a similar question recommended the Advanced Access Manager plugin.


0

Set border property to none instead of white. article.hentry { border: none; // set this to none for no border padding: 1px; background-color: #FFF !important; }


0

Your rule doesn't work for custom post types because pagename is the query var specific to the page post type. Your CPT query vars are the slugs you registered them with, doujinshi_en and doujinshi_jp. You might be able to fix it by adding in additional post types via pre_get_posts: function wpd_add_custom_types( $query ){ if( ...


4

Even if you will keep your content static, you must create the pages through wp-admin. It's the right and easiest way. After that, you have some options of how you will keep your content static: Page template You'll create a file into your theme folder with your static content, starting with this piece of code inside PHP tags: /* Template Name: Enter your ...


0

Its because you where ahead of time!


-1

changed timezone from Asmterdam to UTC(+1) and now it does work


2

WordPress has some nifty functions which do this for you. You'll need some experiences with HTML, CSS, PHP to style the output and understand what these functions do but the functions you're looking for are: the_date() which displays the post date. the_author() which displays the author of the post. In your theme will most likely be a page.php template ...


0

<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); the_title( '<h3>', '</h3>' );// puts the title in h3 tags the_content(); // adds the content endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?> Notice that you can use the title function where ...


0

The following code only load the content of page template <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); the_content(); // show the content endwhile; else: ?> <p>Sorry, no posts matched your criteria.</p> <?php endif; ?>


0

You can use multiple themes for this. I had a similar website with 80% code is similar. There were three educational institutes with logos and address different. Rest was all same. Some courses were different. There was minor differences between them like Menu item, widgets and content on the page. Install any theme. Make it the parent. Then create three ...


0

I can think of two easy ways to achieve this... Using Custom Fields (or Simple Fields plugin) You could use checkboxes for "Display Form," "Display Skype Button," etc. and work it into your template to display the section if the checkbox is checked. Using Categories Or your Pages could actually use category queries, with the categories being "Client A," ...


-1

I have the same problem too. The only solution I could find is to put the foreword/introduction and chapter one in the first part, then press ALT+SHIFT+P to start the pagination. This ensured that page 2 has chapter 2. The problem with this solution is that page 1 is very very long. If you type in the address page/0, you will go to the main page: page/ I ...


0

It's very possible that you have a function or a plugin that is inserting into your content the title. To check if that's right, try to use get_the_content(), it's a function that does not pass the content through the the_content()(important: get_the_content() will not expand shortcodes)



Top 50 recent answers are included