<?php wp_enqueue_script(“jquery”); ?>
<?php wp_head(); ?>
in header.php
————————————
<?php wp_footer(); ?>
in footer.php and
————————————
<?php
function wpbootstrap_scripts()
{
wp_enqueue_script( ‘application’, get_template_directory_uri() . ‘/js/application.js’ );
wp_enqueue_script( ‘bootstrap-collapse’, get_template_directory_uri() . ‘/js/bootstrap-collapse.js’ );
wp_enqueue_script( ‘bootstrap-tab’, get_template_directory_uri() . ‘/js/bootstrap-tab.js’ );
wp_enqueue_script( ‘bootstrap-transition’, get_template_directory_uri() . ‘/js/bootstrap-transition.js’ );
wp_enqueue_script( ‘bootstrap.min’, get_template_directory_uri() . ‘/js/bootstrap.min.js’ );
wp_enqueue_script( ‘owl.carousel’, get_template_directory_uri() . ‘/js/owl.carousel.js’ );
wp_enqueue_script( ‘script’, get_template_directory_uri() . ‘/js/script.js’ );
}
add_action( ‘wp_enqueue_scripts’, ‘wpbootstrap_scripts’ );
?>
—————————————————–
the javascript files are located in a folder called js which is located where header.php is. I don’t understand why this is not working.
Any help will be much appreciated, thank you
]]>I hope someone would be able to help me with this problem. I have installed WordPress 4.2.2 a few days ago. Everything is running smooth. Just one issue. How to install a new theme on Localhost. I downloaded a new theme for my portfolio, extracted all its contents in the wp-content-themes folder, but I CANNOT change the theme. Could anyone help me?
Aarohi
]]>function pagination($pages = '', $range = 4)
{
$showitems = ($range * 2)+1;
global $paged;
if(empty($paged)) $paged = 1;
if($pages == '')
{
global $wp_query;
$pages = $wp_query->max_num_pages;
if(!$pages)
{
$pages = 1;
}
}
if(1 != $pages)
{
echo "<div class=\"pagination\"><span>Page ".$paged." of ".$pages."</span>";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>« First</a>";
if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹ Previous</a>";
for ($i=1; $i <= $pages; $i++)
{
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
{
echo ($paged == $i)? "<span class=\"current\">".$i."</span>":"<a href='".get_pagenum_link($i)."' class=\"inactive\">".$i."</a>";
}
}
if ($paged < $pages && $showitems < $pages) echo "<a href=\"".get_pagenum_link($paged + 1)."\">Next ›</a>";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>Last »</a>";
echo "</div>\n";
}
}
Pagination.css
.pagination {
margin-left:40%;
margin-top:-70px;
clear:both;
padding:20px 0;
position:relative;
font-size:14px;
font-weight:bold;
line-height:18px;
}
.pagination span, .pagination a {
display:block;
float:left;
margin: 2px 2px 2px 0;
padding:6px 9px 5px 9px;
text-decoration:none;
width:auto;
color:black;
background:white;
border:2px solid #e8eaeb;
}
.pagination a:hover{
color:black;
background: rgba(144, 150, 154, 0.075);
border:2px solid #e8eaeb;
}
.pagination .current{
padding:6px 9px 5px 9px;
background: rgba(144, 150, 154, 0.075);
color:black;
border:2px solid #e8eaeb;
}
Pagination Loop In Page Where i want to show Pagination
<?php if (function_exists("pagination")) {
pagination($additional_loop->max_num_pages);
} ?>
Now, The Posts i call to show on page, codes in Functions.php.
$args = array(
'offset' => 0,
'category' => '',
'category_name' => '',
'orderby' => 'post_date',
'order' => 'DESC',
'include' => '',
'exclude' => '',
'meta_key' => '',
'meta_value' => '',
'post_type' => 'post',
'post_mime_type' => '',
'post_parent' => '',
'post_status' => 'publish',
'suppress_filters' => true
);
$posts_array = get_posts( $args );
This one is the Page where i am showing posts..
<?php
query_posts($args); ?>
<?php while (have_posts()) : the_post();
$content = get_the_excerpt();
$content2 = substr($content, 0, 100);
$short_title = the_title('','',false);
$short_title = substr($short_title,0,16);
$id = get_the_ID();
$image = '';
if (has_post_thumbnail( $id ) ):
$image = wp_get_attachment_image_src( get_post_thumbnail_id( $id ), 'single-post-thumbnail' );
endif;
$img = $image[0];
?>
<div class="singlepost">
<a href="<?php the_permalink() ?>"><img src="<?php echo $img; ?>"></a>
<h3 style="margin-left:3%;"><?php echo $short_title; ?></h3>
<p style="margin-left:3%;"><?php echo $content2; ?>...</p>
<a href="<?php the_permalink() ?>" class="button" style="margin-left:3%;margin-top:-19px;">Read More →</a>
</div>
<?php
endwhile;
?>
Please Help me to solve this issue.
]]>Fatal error: Call to undefined function wp_enqueue_media() in /home4/radmanx/public_html/prismaticmantis.com/wp-content/themes/virtue/lib/cmb/init.php on line 257
Now I can only see the undeveloped version of my site with this new theme. And where ever I click to sign in through the back end or edit anything, it takes me to the same blank error page.
www.prismaticmantis.com
What has gone wrong? How can I fix this?
Please help !! :/
]]>Color Combination : Read & Black (white background)
2 Column Widget Enabled with Customized HomePage
License : Limited Non Exclusive (you can use or modify this theme for your own blog but you are not allowed to resell or redistribute it)
Doesnt contain any sponsored link.
]]>( still trying to put the sidebar inline in the bottom but i still cant do it without screwing the blog )
Some feedback comments would be apreciated ty
https://prim3r.myfxh.com/
]]>You can find him on the authors website.
https://www.jsbox.net/256
He also have a Admin Style plug in :
https://www.jsbox.net/category/plugin/
]]>Without knowing anything about coding, i adventur myself of making a theme based on Black Minimalism that is also based on K2.
Want to know what you guys think before i continue working on this… i’ve been this all day… still need to change all icons from a set i have, and need to work on the header.
Here is the link :
https://prim3r.myfxh.com
please tell me what you think
and if you have any suggestions I would he happy to hear them.