w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
jQuery lightbox plugins not working (Wordpress)
Did you check the console for errors? I can see these two: Uncaught TypeError: Cannot call method 'getElementsByClassName' of null new.stevenspiel.com/compositions/:137 Uncaught TypeError: Object [object Object] has no method 'fancybox' You should fix this error first. If you look at line 137, you see this: var $body = document.body , $menu_trigger = $body.getElementsByClassName('menu-trigger')[0]; looks like you have a "," instead of a ";" to end the first line.

Categories : Jquery

Wordpress NextGen Gallery Lightbox not working on Live Server
Turns out the 'shutter' effect in the NextGen Gallery Options wasn't selected, I assumed this would have been a setting which would have been saved in the local DB and exported over but apparently not.

Categories : Javascript

How to show dynamic data in a Lightbox
Thanks Guys for looking into it! I got the solution!! All I did is:- I gave <a class="various" href="#inline"> tag outside each <div class="bin">... </div></a> Ex:- <div class="bin" data-cols="5" data-rows="4"> <div class="number">S3</div> <div class="type">5x4</div> <div class="description">Est. capacity: 34.5 packages</div> </div> And give id="inline" to the div inside which dynamic table is generating:- <div class="beanStructure overflowHidden" id="inline"> <div class="tableContainer"> <table class="container"> </table> </div> </div> Thanks once again

Categories : Javascript

javascript listbox onchange lightbox not show
To update a link when a new option is selected you can do this: $('a.various').attr('href','edit.php?id='+selected_value); Updated version of your on change function: $('#country').on("change", function(){ // Get the selected value var selected_value = $("#country option:selected").val(); // Update lightbox edit hyperlink $('a.various').attr('href','edit.php?id='+selected_value); }); I don't think you need the #selected_value div.

Categories : PHP

Fancybox links don't show in lightbox - what am i missing?
This href="http://placehold.it/350x125" doesn't say to fancybox that you are opening an image so you either : 1). add the fancybox.image special class to your link like <a class="cta-nav-hover fancybox fancybox.image" href="http://placehold.it/350x125" title="Bio"><span></span></a> 2). add the (HTML5) data-fancybox-type attribute to your link like <a data-fancybox-type="image" href="http://placehold.it/350x125" title="Bio" class="cta-nav-hover fancybox"><span></span></a> 3). add the type option to your fancybox script like $(".fancybox").fancybox({ type: "image" }); whatever you think works better for your case. NOTE: numbers 1). and 2). above work for fancybox v2.x only. Number 3). works for either v1.3.4 and v2.x EDIT : incl

Categories : Jquery

RightJs lightbox doesnt show long texts
If you inspect Lightbox DOM via inspector in Chrome or Firefox you will see that it actually has the whole text inside the Lightbox but rui-lightbox-scroller has overflow:hidden CSS rule and it cuts off the text. Play with width settings of Lightbox or try applying the following CSS rule to this element (rui-lightbox-scroller): overflow-y:scroll; The HTML structure is described in Style adjustments section where you can compare the DOM

Categories : Misc

Jquery - 'If Lightbox 1 is open, and press Right, change to lightbox 2' - 2 IF Statements
you can simplify this logic a bit by abstracting this a bit. have a function that opens a light box that takes a parameter thats a jquery element of the light box to be opened and also have one that closes it. save a variable that holds all the light box clickable elements and use the jquery data- api to bind the button to the light box it opens also save a variable that is a class name for whatever is open. add a click listener to the light box buttons that looks at what was clicked and opens a light box based on that (using the data api) by calling that open function. Also set up your click listners for the close and backdrop elements that close a light box and have them close the open one by using that class name for whatever is open whenever you open a lightbox, add key listeners a

Categories : Jquery

Show different content on each category in Wordpress
You can look at this really old forum post, which pretty much just says use the is_category() function if(is_category(9)) { //show come banner } else if(is_category(10)) { //show another banner } else { //show default banner } ?>

Categories : PHP

Show Posts from Another WordPress Site
Easiest thing to do is use RSS. See FeedWordPress | simple and flexible Atom/RSS syndication for WordPress and Developer's Guide - Google AJAX Feed API - Google Code and Magpie RSS - PHP RSS Parser for different ways to implement RSS feeds as links or import posts themselves.

Categories : PHP

how to show a element only in post page wordpress
use the is_home() conditional tag <div class="social-tools <?php if(is_home() ) { ?>container<?php } ?>"> even though its written like that - is_home() shows the posts page check out this question

Categories : PHP

show post titles below each category wordpress
First of all, your code is broken which might break your theme so the posts don't show up. The last line before endforeach lacks closing tags for and . Also php opening and closing tags are present inside the PHP code, which is very wrong. $show_count = 0; $pad_counts = 0; $hierarchical = 1; $taxonomy = 'filter'; $title = true; $description = true; $args = array( 'show_count' => $show_count, 'pad_counts' => $pad_counts, 'hierarchical' => $hierarchical, 'taxonomy' => $taxonomy, 'use_desc_for_title' => $description, 'title_li' => $title ); $categories=get_categories($args); foreach($categories as $category) { echo '<p>Category: <a

Categories : Wordpress

How to show WordPress author.php when user has no posts?
Could you not make your own query? haveno_posts{ If Posts = 0 then return true? } <?php if ( have_posts() ) : ?> would be <?php if ( have_posts() || haveno_posts() ) : ?> alternatively: http://wordpress.org/plugins/show-authors-without-posts/admin/ http://wordpress.stackexchange.com/questions/41078/show-author-archive-pages-for-authors-with-no-posts

Categories : PHP

Show Registration form in front end wordpress
Here is an (old) article about customizing your registration / login form: http://digwp.com/2010/12/login-register-password-code/

Categories : PHP

wordpress header includes no show in other pages
The answer to this one might help: How to use own php variables in wordpress template? To save you clicking(!), here's the answer to that issue: The $test variable is empty because the header is included by a function, hence effectively 'in' the function, and more importantly, in a different scope.. think of it like function get_header() { $test = '1234'; } get_header(); echo $test; // won't work because test is in a different scope you can however use globals, or $_SESSION variables, or create a static class to hold variables in that can be called from anywhere. the global option is probably the quickest fix here (not necessarily the strictest though). $GLOBALS['test'] = "Blabla"; get_header(); .. inside a wordpress header template: echo $GLOBALS['test'];

Categories : PHP

In WordPress, how can I only show something in a page has children pages?
You could try <?php global $wp_query; if( empty($wp_query->post->post_parent) ) { $parent = $wp_query->post->ID; } else { $parent = $wp_query->post->post_parent; } $children = get_pages('child_of='.$parent); if( count( $children ) > 0 ) { ?> <ul> <?php wp_list_pages ("&title_li=&child_of=$parent"); ?> </ul> <?php }

Categories : PHP

Show related posts by taxonomy Wordpress
Did you tried adding the following argument to your WP_Query array of arguments? 'tax_query' => array(array('taxonomy' => 'product_cat')) The code will look like this (of course after removing the category parameter): <?php global $post; $loop = new WP_Query( array( 'post_type' => 'product','post__not_in' => array($post->ID), 'tax_query' => array(array('taxonomy' => 'product_cat'))) ); ?> <?php while ( $loop->have_posts() ) : $loop->the_post(); ?> <?php the_title( '<h2 class="entry-title"><a href="' . get_permalink() . '" title="' . the_title_attribute( 'echo=0' ) . '" rel="bookmark">', '</a></h2>' ); ?> <?php endwhile; ?>

Categories : PHP

How to show plugin output in wordpress frontend
Make sure that your code is registering the widget to WordPress Activate your plugin from the WordPress Admin area > Plugins Go to WordPress Admin area > Appearance > Widget, you should see your new widget listed there Drag your widget onto a sidebar and save your changes View the wigdet on the side bar of your WordPress front end

Categories : Wordpress

WordPress: How to show a metabox on any admin page?
if my understanding is right you can do it by following Here is a Demo plugin that can help you get it working. This WordPress Plugin demonstrates how you can build your own plugin pages using the WordPress provided draggable metaboxes, requires WordPress 2.7 version, supports WordPress 2.8 changed boxing layout engine

Categories : PHP

Wordpress custom fields to show Link with URL
Try out the following plugin. Hope this will help you. http://wordpress.org/plugins/slideshow-satellite/installation/

Categories : Wordpress

wordpress woocommerce show breadcrumbs in checkout page?
May be helpfull for you There are two files you need to change your breadcrumb's in WooCommerce. You'll find those files in your WooCommerce plugin directory First Template file: if ( ! function_exists( 'woocommerce_breadcrumb' ) ) { /** * Output the WooCommerce Breadcrumb * * @access public * @return void */ function woocommerce_breadcrumb( $args = array() ) { $defaults = array( 'delimiter' => ' &rsaquo; ', 'wrap_before' => '<div id="breadcrumb" itemprop="breadcrumb">', 'wrap_after' => '</div>', 'before' => '', 'after' => '', 'home' => null ); $args = wp_parse_args( $args, $defaults ); woocommerce_get_template( 'shop/breadcrumb.php', $args ); } } The second file: /woocommerce/templates/shop/breadcrumb.php,

Categories : Wordpress

Div show hide failing to work with bootstrap and wordpress
I think .load() has been deprecated in the jQuery version you're using. This might point you in the right direction Also in my opinion you should include your javascript code at the bottom of the page. Sometimes that might not be possible when working with CMS's in which case you'll want to wrap your js in a document ready function like so: $(function(){ //code here });

Categories : Javascript

How can I count/Show the number of online users in wordpress
Use QuickCount for this operation http://wordpress.org/plugins/quick-count/ WP-UserOnline is good too http://wordpress.org/plugins/wp-useronline/installation/

Categories : PHP

How to show first blog image in full width in wordpress
heres a brief code - edit accordingly <?php get_header(); ?> <?php $first = true; ?> <?php if ( have_posts() ) : while ( have_posts() ) : the_post();?> <?php if ( $first ){ ?> <div id="featured-image"><?php the_post_thumbnail('featured'); //You will need a custom size ?></div> <?php $first = false; ?> <section id="content"> <?php } ?> <section id="blog-bost" <?php post_class(); ?>> <?php $first = true; ?> <?php if($first){ the_title(); the_excerpt(); } else{ the_post_thumbnail(); the_title(); the_excerpt();} ?> </section> <?php endwhile; endif; wp_reset_query(); ?> </section> <?php get_sidebar();?> <?php get_footer(); ?>

Categories : Image

WordPress: How do I show the parent category in the post meta?
Try this: (taken from this post: Wordpress function to get top level category of a post?): put this in your functions.php file at the bottom before the closing ?> tag function get_top_category() { $cats = get_the_category(); // category object $top_cat_obj = array(); foreach($cats as $cat) { if ($cat->parent == 0) { $top_cat_obj[] = $cat; } } $top_cat_obj = $top_cat_obj[0]; return $top_cat_obj; } Amend your content.php: <?php $top_cat = get_top_category();?> <?php printf( __( 'Posted in %1$s', 'underground_sound' ), $top_cat->slug .' - '.$categories_list ); ?>

Categories : Wordpress

Show only posts related to category or page wordpress
For connect this category to this page you can set product to category archive page from wp-admin/nav-menus.php you can create a simple page template to list category post you can use http://wordpress.org/plugins/list-category-posts/ plugin and use short code like [catlist name="news"] in you page content.

Categories : Wordpress

Displaying posts thumbnails in Wordpress show only first thumbnail
run 2 queries one outputs the first post. The second outputs everything else excluding the first <?php $args = array( 'post_type' => 'attachment', 'posts_per_page' => 1, 'post_parent' => $post->ID); $first = new WP_Query( $args ); while ( $first->have_posts() ) : $first->the_post(); ?> <a href="<?php echo get_permalink();?>"><?php the_title();?><?php echo wp_get_attachment_image( $first->ID, 'thumbnail' );?></a> <?php endwhile; wp_reset_postdata(); ?> <?php $args2 = array( 'post_type' => 'attachment', 'posts_per_page' => 1, 'post_parent' => $post->ID, 'offset' => 1); $rest = new WP_Query( $args2 ); while ( $rest->have_posts() ) : $rest->the_post(); ?> <a href="<?php echo get_permalink();

Categories : PHP

wordpress show time of post incorect into my plugin
From WP Documentation, get_the_time returns the time of the current post for use in PHP. It does not display the time. To display the time of a post, use the_time(). This tag must be used within The Loop. So I think you want to use, the_time('F j, Y') Edit: Try adding this line as the first line in your foreach loop: setup_postdata( $post );

Categories : Wordpress

Foundation for Wordpress - How to show text if no menu is chosen?
a rather simple way is using the has_nav_menu argument in your case: <?php if ( has_nav_menu( 'left-menu' ) ) { wp_nav_menu( array( 'theme_location' => 'left-menu', 'menu_class' => 'left', 'container' => '', 'walker' => new foundation_navigation() ) ); }else{echo 'YOUR TEXT';} ?> and so on... more info here

Categories : PHP

What is the php I need to show a Custom Field Value from a Drop Down Box, Type (Select2), in Wordpress
Here's how I would accomplish this. On your post or page, add the custom field. So if you have a custom field of 'years' we'll add 2013 and 2014 and 2015 as 3 entries. Save your post/page. This creates an array for this custom field that you can iterate through. see here for code. http://pastebin.com/Ungm3WZW FYI - I referenced the codex for http://codex.wordpress.org/Function_Reference/get_post_custom_values

Categories : Wordpress

Struggling to get custom meta data to show in wordpress post
I think I see a couple of syntax errors in your code, such as the way you want to print the custom field's values and so on. I would recommend this approach as opposed to the approach you are using, and I'll explain why in a bit, after the code. PHP WordPress Loop with get_post_meta(); <?php if (have_posts()) : while (have_posts()) : the_post(); ?> <!--This is a conditional statement to see if the value of the custom field has something, and if it does then it shows it, otherwise it doesn't render anything--> <?php if ( get_post_meta($post->ID, 'cf-size', true)):?> <h1>Custom Field Value: <?php echo get_post_meta($post->ID, 'cf-size', true);?></h1> <?php endif;?> <?php endwhile; endif; ?> You can notice that cf-size is

Categories : PHP

Menus editor show language tags in wordpress 3.6 (qTranslate)
That's an old issue. And can be solved with this snippet: function qtrans_menuitem( $menu_item ) { $menu_item->title = qtrans_useCurrentLanguageIfNotFoundUseDefaultLanguage( $menu_item->title ); return $menu_item; } add_filter( 'wp_setup_nav_menu_item', 'qtrans_menuitem', 0 ); Reference: Where do I put the code snippets I found here or somewhere else on the web?

Categories : Wordpress

Show the category and the list of all subcategories in wordpress sidebar of a post
$q_cat = get_query_var('cat'); $cat = get_category($q_cat); $catname = $cat->cat_name; echo $catname; $childcategories = get_categories('child_of='.$cat->cat_ID); foreach($childcategories as $ccat){ echo $ccat->cat_name; or no echo try with $output =''; <-- your html code return $output;

Categories : Wordpress

how to show one artical from a category and rest of articals as an archive in wordpress
This is not a function I've used before but looks like it should do what you need: http://codex.wordpress.org/Function_Reference/wp_get_recent_posts Just change the posts_per_page to 1. (EDIT: And also change the category to the ID of your newsletter category)

Categories : Wordpress

WordPress - show most read posts in 7 days, query by filter
Here is the plugin WP Plugin: Top 10 posts and Views per post download this plugin and edit top10.php replace the function show_pop_posts() with this one function show_pop_posts() { global $wpdb, $siteurl, $tableposts, $id; $results = $wpdb->get_results("select postnumber, cntaccess from mostAccessed ORDER BY cntaccess DESC LIMIT 7"); echo "<ul>"; if ($results) { foreach ($results as $result) { echo '<li><a href="'.get_permalink($result->postnumber).'">'.get_the_title($result->postnumber).'</a> ('.$result->cntaccess.')</li>'; } } echo "</ul>"; }

Categories : PHP

Wordpress show posts from children terms of a taxonomy term
Try getting all the term children of the current term you are displaying. Then looping through each of those and pulling the posts for each term. You could do something like the below: <?php $taxonomies = get_term_children( $id, 'custom_cat'); foreach($taxonomies as $tax){ $term = get_term_by( 'id', $child, $taxonomy_name ); get_posts(array('cat'=>$term['id'])); } ?>

Categories : Wordpress

Show content from custom tables into wordpress standard rss feeds
Okay I guess I answer my own question. The way I have accomplished it is using by following the workflow as: Create a custom template file for rss feed which contains all queries to pull your required content and rss code. Then cope the following code inside your theme's functions.php Code: remove_all_actions( "do_feed_rss2" ); add_action( 'do_feed_rss2', 'ipc_project_feed_rss2', 10, 1 ); function ipc_project_feed_rss2( ) { if(file_exists(TEMPLATEPATH . '/ipc_rss_feed_template.php')) load_template( TEMPLATEPATH . '/ipc_rss_feed_template.php'); else die("RSS Feed not found.."); } The code above will override your standard feed so it uses your new custom template file for RSS Feeds

Categories : Wordpress

I need to show recent two wordpress posts in my codeigniter site at home page
You may try this define('WP_USE_THEMES', false); require('blog/wp-load.php'); $postslist = get_posts( array( 'posts_per_page' => 2, 'orderby'=> 'post_date' ) ); foreach( $postslist as $post ) : setup_postdata($post); ?> <div class="events"> <p><strong><?php the_date(); ?></strong></p> <p><a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></p> </div> <?php endforeach; ?>

Categories : PHP

Show different footer if the total amount of published posts is greater than one in Wordpress?
= performs an assignment, so this: if($count_posts = 1){ ... is basically the same as this: $count_posts = 1; if($count_posts) { Most likely you wanted to do a comparison instead of an assignment: if($count_posts == 1){

Categories : PHP

How to show 3 most recent posts in a special tiles on home page using wordpress?
Here is one way to do it. If you're new you should read up on these essential topics: The Loop and WP_Query. <?php $query = new WP_Query( 'posts_per_page=3' ); // The Loop if ( $query->have_posts() ) { $i = 1; while ( $query->have_posts() ) { $query->the_post(); $i++; ?> <div class="tile<?php echo $i ?>"> <img class="post-image" src="<?php echo get_post_meta($post->ID, 'post_image', true) ?>"/> <div class="tile-datebox"> <img src="<?php echo get_post_meta($post->ID, 'post_icon', true) ?>" > <p><?php the_time('F jS, Y') ?></p> <div class="tile-info"><h1><a href="<?php the_per

Categories : PHP

Wordpress Loop - Show posts from custom taxonomy terms in heirarchical order
Posts ordered in admin page by "menu_order"; If u want to order posts using query_posts (WP_Query constructor) u should use value of variable "orderby" in upper case -> "ID".

Categories : PHP



© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.