New answers tagged

2

Just add a variable to the function so you can call it differently from the template... EDITED: pass the footer row to function and return class... function mytheme_footer_sidebar_class($row) { if ($row == 1) {$i = 1; $j = 5;} elseif ($row == 2) {$i = 5; $j = 9;} $active_sidebars = 0; for ($i; $i < $j; $i++) { if ( ...


0

Here you go.. function xobamax_resources() { wp_enqueue_style('bootstrap', get_template_directory_uri() . 'css/bootstrap.min.css'); wp_enqueue_style('style', get_stylesheet_uri()); wp_enqueue_script( 'bootstrap-js', 'https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js', array('jquery'), '3.3.4', true ); } ...


0

So I have done figured out a solution using php Ill explain below: So I created a var and called it white. It has a empty string that I used and an if statement then I used the WordPress function is_front_page <?php $white = ""; if( !is_front_page() ) { $white = 'scrolled'; } ?> Then in my Navbar class I added this: <?php ...


0

Most WordPress themes take advantage of a function called body_class() which outputs specific classes to the body tag. Implementation looks something like this: <body <?php body_class(); ?>> This will put a unique class on the homepage of your website that won't be on any of the other pages so you could target that specifically in jQuery or ...


0

There are 4 arguments that might help you with wp_nav_menu(): before – "(string) Text before the link text." after – "(string) Text after the link text." link_before – "(string) Text before the link." link_after – "(string) Text after the link."



Top 50 recent answers are included