How to just display “Log in” / “Site Admin” and “Log out” under the sidebar META section?
First a bit explanation of the context. The content of the default sidebar META section is composed of list items that are displayed by the core code of WordPress.
It means that we can’t change those list items except if we modify some codes of WordPress itself, which is considered as a custom hack of WordPress and a custom hack is never a clean way because you have to re-do such hack again and again after each WordPress update that you install.
If you really want to go for such custom hack, it’s a topic that is a bit out of the AdFlex theme but I can tell you how to custom hack WordPress to get the wanted results.
Option A: Custom Hack of WordPress
You will have to edit the default WordPress META Widget in WP_ROOT/wp-includes/widgets.php and take out all the non-needed links from that file. Of course, as said, it’s not a clean way because you’ll have to repeat the same file content change again and again after each WP update that you install.
Now there’s a cleaner way to when using Ad Flex Blog or Ad Flex Niche. It’s a cleaner way because it ensures your changes will remain effective even after an update to a new version of WordPress and/or AdFlex.
Option B: Recommended and cleanest way when using Ad Flex Blog or Ad Flex Niche
The recommended way is as follows:
– On the server, located the folder:
WP_ROOT/wp-content/themes/ad-flex-blog/syndication (in the case of Ad Flex Blog) or WP_ROOT/wp-content/themes/ad-flex-niche/syndication (in the case of Ad Flex Niche)
– In the folder, you’ll see the filename “_syndication_custom_sidebar.php”
– Rename the file “_syndication_custom_sidebar.php” to “syndication_custom_sidebar.php”
– Open the file “syndication_custom_sidebar.php”
– Add the following code at the end of the file content “syndication_custom_sidebar.php”:
<h2><?php _e('Meta'); ?></h2>
<?php wp_register(); ?>
<li><?php wp_loginout(); ?></li>
– Save the file “syndication_custom_sidebar.php”
– Connect to the WordPress Dashboard and go to the Ad Flex Blog/Niche “Theme Options”
– Locate the section “Sidebar Options”
– Scroll down to the parameter “Custom Section Visibility” and set it to “Visible”.
– Click on “Update All Options”
– Go to the WordPress Dashboard \ Appearance \ Widgets.
– Locate the “AdFlex Custom” widget and activate it
Now you can connect to your blog URL and you should see the results.
Note: Depending on your web browser and your current caching setting, your may need to refresh/reload the web page or restart your web browser.