agoy
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: How to create a horizontal footer menuApparently i didnt even have to change the screen.css
But now – how do I make them spread evenly out?
(check https://www.agoy.dk)
Forum: Fixing WordPress
In reply to: How to create a horizontal footer menuOk, I think I changed it:
Before
#footer_sitemap_widget li {
display: inline-block;
margin-right: 20px;
max-width: 150px;
vertical-align: top;After
#footer_sitemap_widget li {
display: inline-block;
margin-right: 20px;
max-width: 100%;
vertical-align: top;
}
#footer_sitemap_widget li {
font-size: 14px;
margin-top: 20px;
}
#footer_sitemap_widget li a {
border-bottom: 1px solid;
display: block;
margin-bottom: 15px;
padding-bottom: 5px;
}
#footer_sitemap_widget .sub-menu li {
font-size: 10px;
margin-top: 0;
padding: 0 2px 0 2px;
}
#footer_sitemap_widget .sub-menu li a {
border-bottom: none;
display: block;
margin: 0;
}Forum: Fixing WordPress
In reply to: How to create a horizontal footer menuand where in the wp-dashboard do I find the screen.css?
Forum: Fixing WordPress
In reply to: How to create a horizontal footer menuI have absolutely no idea where to insert that!
The widget ccs says: (and please show me where the change should be made)
<?php
/*
Plugin Name: Horizontal Footer Sitemap – Widget
Plugin URI: https://URI_Of_Page_Describing_Plugin_and_Updates
Description: A simple widget which uses the menu of your selection to show them horizontaly as a Horizontal Footer Sitemap
Version: 1.0
Author: Mario Shtika
Author URI: https://mario.shtika.info
License: GPL2
*//* Start Adding Functions Below this Line */
// Creating the widget
class horizontal_footer_sitemap_widget extends WP_Widget {function __construct() {
parent::__construct(
// Base ID of your widget
‘horizontal_footer_sitemap_widget’,
// Widget name will appear in UI
__(‘Horizontal Footer Sitemap’, ‘horizontal_footer_sitemap_widget’),
// Widget description
array(‘description’ => __(‘Add a custom menu to your side bar and show it horizontaly as a Horizontal Footer Sitemap’, ‘horizontal_footer_sitemap_widget’),)
);// Register style sheet.
add_action( ‘wp_enqueue_scripts’, array( $this, ‘register_plugin_styles’ ) );
}// Widget Frontend
public function widget($args, $instance) {
// Get menu
$nav_menu = ! empty( $instance[‘nav_menu’] ) ? wp_get_nav_menu_object( $instance[‘nav_menu’] ) : false;if ( !$nav_menu ) {
return;
}echo ‘<div id=”footer_sitemap_widget”>’;
echo $args[‘before_widget’];wp_nav_menu( array( ‘fallback_cb’ => ”, ‘menu’ => $nav_menu ) );
echo $args[‘after_widget’];
echo ‘</div>’;
}public function register_plugin_styles() {
wp_register_style(‘horizontal_footer_sitemap_widget’, plugins_url(‘/css/widget.css’, __FILE__));wp_enqueue_style(‘horizontal_footer_sitemap_widget’);
}// Widget Backend
public function form($instance) {
$nav_menu = isset($instance[‘nav_menu’]) ? $instance[‘nav_menu’] : ”;// Get menus
$menus = wp_get_nav_menus( array( ‘orderby’ => ‘name’ ) );// If no menus exists, direct the user to go and create some.
if ( !$menus ) {
echo ‘<p>’. sprintf( __(‘No menus have been created yet. Create some.’), admin_url(‘nav-menus.php’) ) .'</p>’;
return;
}
?><?php // Widget admin form ?>
<p>
<label for=”<?php echo $this->get_field_id(‘nav_menu’); ?>”><?php _e(‘Select Menu:’); ?></label>
<select id=”<?php echo $this->get_field_id(‘nav_menu’); ?>” name=”<?php echo $this->get_field_name(‘nav_menu’); ?>”>
<option value=”0″><?php _e( ‘— Select —’ ) ?></option>
<?php
foreach ( $menus as $menu ) {
echo ‘<option value=”‘ . $menu->term_id . ‘”‘
. selected( $nav_menu, $menu->term_id, false )
. ‘>’. esc_html( $menu->name ) . ‘</option>’;
}
?>
</select>
</p>
<?php
}// Updating widget replacing old instances with new
public function update($new_instance, $old_instance) {
$instance = array();
if (!empty($new_instance[‘nav_menu’])) {
$instance[‘nav_menu’] = (int) $new_instance[‘nav_menu’];
}
return $instance;
}}
// Class horizontal_footer_sitemap_widget ends here
// Register and load the widget
function horizontal_footer_sitemap_widget_load_widget() {
register_widget(‘horizontal_footer_sitemap_widget’);
}add_action(‘widgets_init’, ‘horizontal_footer_sitemap_widget_load_widget’);
/* Stop Adding Functions Below this Line */
?>Forum: Plugins
In reply to: [Easy Facebook Feed] Feed not showingOk, so how do I enable that on my own?
And how do I upload easy-facebook-feed to the /wp-content/plugins/ directory ??