How do you center the main menu in CSS? [closed]
Try this : #catnav, #catnav ul { display: block; font-size: 8px; line-height: 1; list-style: none outside none; margin: 0 auto; padding: 0; position: relative; width: 594px; z-index: 999; }
Try this : #catnav, #catnav ul { display: block; font-size: 8px; line-height: 1; list-style: none outside none; margin: 0 auto; padding: 0; position: relative; width: 594px; z-index: 999; }
Security issues arise when you write code that open up possibilities for outsiders to access your database or otherwise compromise your installation. The above code just reads options and content from the database and translates this into static html that will be send to the browser of the page’s visitor. There’s no code (like a … Read more
Refer to the Template Hierarchy in Codex. If you have assigned a static front page, the template that will take priority for that page is front-page.php, and the template for the posts (blog) page is home.php.
The issue is that WP customizer submits the changes, but has not processed these yet at that point in time. If you cant wait for WP customizer to do it’s thing by using a later action, here is a solution where you get the customized information and use it to overwrite the information we had. … Read more
This should be located in the entry-meta.php file of the parent theme (kuorinka). Here is the code: <?php if ( ‘post’ == get_post_type() ) : ?> <div class=”entry-meta”> <!– Date & Author name–> <?php kuorinka_posted_on(); ?> <!– Comments count –> <?php if ( ! post_password_required() && ( comments_open() || ‘0’ != get_comments_number() ) ) : … Read more
Check if get_option returns a value and if it is not blank, then output the links. This should work for you: <?php if(get_option(‘to_facebook’) && get_option(‘to_facebook’) != ”) { ?> <a href=”https://wordpress.stackexchange.com/questions/34948/<?php echo get_option(“to_facebook’); ?>”></a> <?php } if(get_option(‘to_google_plus’) && get_option(‘to_google_plus’) != ”) { ?> <a href=”https://wordpress.stackexchange.com/questions/34948/<?php echo get_option(“to_google_plus’); ?>”></a> <?php } ?>
It depends on the theme itself. A theme may store some data in the database. For example, a theme may have an option called “Social Accounts” section in settings page and a field “Facebook Page URL” in it. If you fill the field and save settings, it will store this value to database. But, as … Read more
@Mamaduka: Here is why your settings aren’t updating. Your validation function is wrong. To wit: function ev_options_validate( $input ) { $ev_options = get_option( ‘theme_evolutionary_options’ ); $valid_input = $ev_options; $ev_options[‘color_scheme’] = array_key_exists( $ev_options[‘color_scheme’], ev_get_valid_color_schemes() ) ? $ev_options[‘color_scheme’] : ‘blue’; $ev_options[‘copytright’] = wp_kses_data( $ev_options[‘copyright’] ); return $valid_input; } You’re updating $ev_options, but returning $valid_input. You need to … Read more
The options are being output within the loop, so are being repeated for each iteration of the loop. To check within the loop and only output something on the first iteration: while ( have_posts() ) : the_post(); if( $wp_query->current_post == 0 ): // this is the first post // output your options endif; // other … Read more
Use that JQuery code from your question in customizer preview for real time update. Your transport should be set to ‘postMessage’. In your website you can add body class in function.php: function theme_prefix_body_class( $classes ) { if ( get_theme_mod(‘header_fixed’, 0 ) == true ) { $classes[] = ‘fixed-header’; } return $classes; } add_filter( ‘body_class’, ‘theme_prefix_body_class’ … Read more