I am writing a Drupal theme. And I somehow have hidden my admin bar and forgot about that. But now, my employer tell me to display it again.
So, I want to know, is there any function or variable that can display admin page? As $page or $page_top, for example.
I've overriden almost all files: html.tpl.php, page.tpl.php, region.tpl.php, node.tpl.php
do the following steps:
go to module list, in core modules be sure that dashboard is enable.
now check your html.tpl.php, you should have the following:
<?php print $page_top; ?>
at the end go to the people -> permissions. make sure in Dashboard section, "View the administrative dashboard" is checked for correct roles.
Related
I want to add some extra form fields to an existing page in Wordpress.
This page is where you are redirected whenever you edit a post or page.
My problem is I don't know where to find this file or what its called.
I need to know what file i need to edit in order to be able to add the new inputs.
this page would only be seen if you are an administrator and logged in and in dashboard.
I'm using wordpress edge shuffle theme.
The easiest way to solve this is to use Advanced Custom Fields. ACF allows you to specify custom fields that appear on certain edit pages in the admin. You'll then have custom data to use on your frontend templates.
Check out this tutorial for more.
For me, as I was just trying to figure out how to edit my posts page
While logged on to my admin account to edit, I went to my actual page and the top admin bar had an option of "customize" and that took me where I needed to go to add some css
I have a drupal installation, which shows 2 different page when I enter the full domain (www.example.com ) and when I enter the full domain with /node ( www.example.com/node ).
When I put a new post, it shows up in "/node" url ( www.example.com/node ) but not when I enter the full domain.
When I login, admin bar also not visible for homepage and it's visible in every other page.
In drupal there is theme template concept, for front-page in your current theme someone might have written code/rule to hide (admin bar) and other dynamic stuffs.
Solution !
Under your current theme check for page--front.tpl and within the file, check whether there is some code to override the admin bar and others things.
Reffer below URL for template information,
https://drupal.org/node/171194
I have a Wordpress configuration where I would like to allow a user to edit Menus and Widgets without exposing the Theme and Edit CSS options.
Can anyone point out how to do this? So far I have only been able to expose all of the "Appearance" menu in the dashboard to that user.
There are a few WP Capabilities that are used to control access to the themes appearance menu.
"edit_theme_options" - use to allow access to the widgets, menus and theme options, and to deny access to switch themes, or modify files in the theme.
$role = get_role( 'editor' );
$role->add_cap( 'edit_theme_options' );
"switch_themes" - allows access to switch themes.
edit_themes - allows to edit files in the theme.
NOTE: Because add_cap function saves settings in the database, they will stay until are removed with remove_cap function.
I've had good luck with the plugin Adminimize. It gives you the ability to control who sees what for every option in the admin menu and a lot more. It is very detailed and can be a little overwhelming at first, but it isn't as bad as it looks once you've spent a little time around it. Hope that helps and good luck.
Developing a wordpress plugin I have problems to setup a custom edit page to handle my items in the admin area. I have been taking a look what is the workflow in case of posts and as I see all edit actions are redirected from edit.php to post.php?post=33&action=edit. I have been setting up an option page and I handle from here all items edits but in this case shows the menu in the sidebar what is not optimal for the user, because if no item id is passed to it can cause a lot problems. I have to mention, developing Wordpress plugins is something new for me and maybe the researches what I made are not proper. I have been taking a look in wordpress API and I found the following function
add_management_page().
but this needs to be ordered under the admin menu
adding the following function and linking my items edit like
admin.php?page=parser-target-edit&record=73
add_submenu_page( 'parser-top-level-handle', 'Edit', 'Sub-menu title', 'manage_options', 'parser-target-edit', array($this , 'edit_item') );
is working but as I said is showing up in the sidebar as menu item. So it has to be another workaround what it can be used in case of edit action
You can try add_menu_page() which can be coupled to add_submenu_page() to create administration pages
You can execute a callback function that gets executed from add_menu_page().
We have a site with a members-only section and WordPress in a subdirectory. Some of the members-only pages, forms, etc. are outside of WP. We created a Member Login form on our homepage using Dreamweaver 5.5. Is there a way to have WordPress accept that main login so that a member doesn't need to login again when going to a WP member-only page? Thanks for any help you can be in pointing me in the right direction. I know just enough PHP to be dangerous. Let me know if you would like to see the DW login code.
Yes, you are talking about creating your own custom template for a Wordpress page.
You can use the page you generated from Dreamweaver by renaming its extension to .php, unless it already is. Move it to the /wp-content/themes/yourtheme folder, where yourtheme is your currently active theme. On the top of the template, add these lines:
<?php
//
// Template Name: Login Form
//
?>
Go to Wordpress Dashboard > Pages > Add New. Add a page called 'Login' or whatever you need, select 'Login Form' as the Template under Page attributes, and you Publish.
Reference: http://codex.wordpress.org/Pages#Creating_Your_Own_Page_Templates