ikaring
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Full Width Featured ImageI think the simplest way is to add 100% width div with the image as a background image.
Put div with class name like ‘hero’ right before div#content like so;<div class="hero"></div> <div id="content" class="cf site-content">Add css styles like:
.hero { background: url('http://simconnection.net/wp-content/uploads/2015/09/12593991_359206020870201_3347543352591936245_o.jpg') no-repeat center top;/* Set path to your image */ background-size: cover; height: 400px;/* Assign any height */ }Forum: Fixing WordPress
In reply to: how to link images in gallery to another website or page?‘Output’, I meant, is HTML output returned by [gallery] shortcode.
[gallery] shortcode is located in wp-includes/media.php, and it has ‘post_gallery’ filter to customize the output.
So you can use default [gallery] shortcode as a starting point, and make ‘post_gallery’ filter hook to add links to specific page or an external url.This process might be a bit complicated for just adding a link to gallery images, I think it is not a bad choice to use a plugin for that purpose.
Cheers!
Forum: Fixing WordPress
In reply to: how to link images in gallery to another website or page?Hi. It’s just an example code since I don’t know desired output.
If above code blocks do not make sence to you, why not consider to use the plugin you mentioned.
That should be much simple and easy, I guess.Forum: Fixing WordPress
In reply to: how to link images in gallery to another website or page?I checked myself and found that there is a “Custom Url” option in ‘Link To” setting by default.
It is far down the Caption field or Title field.PS. Sorry that is only for Insert Media menu, not for Create Gallery. Forget the above.
Forum: Fixing WordPress
In reply to: how to link images in gallery to another website or page?You dont have to use slider.
Just build $output for your desired html output.
In above tutorial, $output is defined from line 40 to 100.For example, if you use the caption field as link url in each images, it can be retrieved by:
$link = $attachment -> post_excerpt;And then add to $output around line 62, like:
$output .= '<a href="' . esc_url( $link ) . '">'; $output .= "<img src=\"{$img[0]}\" width=\"{$img[1]}\" height=\"{$img[2]}\" alt=\"\" />"; $output .= "</a>";Forum: Fixing WordPress
In reply to: how to link images in gallery to another website or page?It can be customized for any slider.
Forum: Fixing WordPress
In reply to: how to link images in gallery to another website or page?You can customize the output of [gallery] shortcode.
http://webdesignforidiots.net/2015/02/customizing-the-output-of-the-gallery-shortcode/
Forum: Everything else WordPress
In reply to: gallery building tutorialsI dont think I understand what you are trying to achieve, but how about customizing [gallery] shortcode for your needs?
This tutorial shows how and that is easier than building gallery feature from scratch.
http://webdesignforidiots.net/2015/02/customizing-the-output-of-the-gallery-shortcode/Forum: Fixing WordPress
In reply to: display custom post based on titleSorry to be late, it was Japanese holidays^^
I suppose your code is on page template, instead of single post template.
If that is the case, pls replace$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;with
$paged = get_query_var( 'page', 1 );It is ‘page’ instead of ‘paged’.
Below is just for your info:
Actually I didn’t know that get_query_var can have default value in second parameter.$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;can also be written as
$paged = get_query_var( 'paged', 1 );Forum: Fixing WordPress
In reply to: display custom post based on titleHi Vince_M.
First thing I thought was a positioning of the code.
Where is it placed?
It is to be put on afterendwhileand beforeendif, I guess.Secondly, what is the output of
var_dump( $paged );of second page?$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1; var_dump( $paged );Forum: Fixing WordPress
In reply to: The word 'Category:' displays before category nameYour theme Orvis seems to be of WordPress.com not WordPress.org.
That means you can not customize theme unless theme option is provided for the feature.Forum: Hacks
In reply to: Stopping autoplay on iframe videosIs that video a YouTube video or your self hosting one?
Since iframe tag does not support autoplay attribute, your tag will not work.
If you useautoplay=0, it should be like<iframe width="420" height="315" src="http://www.youtube.com/embed/XGSy3_Czz8k?autoplay=1"> </iframe>http://www.w3schools.com/html/html_youtube.asp
If you can stop autoplay with video tag, why not using it?
You can make it responsive with css setting, I guess.Forum: Fixing WordPress
In reply to: display custom post based on titleCongraturations!
Managing title Results should be much easier.
Split the line
<?php if ( $the_query->have_posts() ) : while ( $the_query->have_posts() ) : $the_query->the_post(); ?>
to<?php if ( $the_query->have_posts() ) : ?> // put title Results here <?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>As for pagination, there are many plugins to handle. I usually use WP-PageNavi.
https://wordpress.org/plugins/wp-pagenavi/Cheers.
Forum: Fixing WordPress
In reply to: display custom post based on titleI think so, too. It must be really simple thing.
Actually there is a difference in the output of
var_dump( $athlete );.
That should be something like
string(17) "Jennifer Saunders"
instead of just the title textJennifer Saunders.I found “(” in front of Jennifer Saunders. What is it?
And meta_query part of
var_dump( $the_query )should look like
["meta_query"]=> array(1) { [0]=> array(3) { ["key"]=> string(14) "result-athlete" ["value"]=> string(17) "Jennifer Saunders" ["compare"]=> string(1) "=" } }Forum: Fixing WordPress
In reply to: display custom post based on titleI have tested myself.
Please replace the line below.$athlete = wp_title('', false);with
$athlete = single_post_title('', false);I found a strange point. Please check if server data is updated.
In meta_query, there should be ‘key’ and ‘value’, instead of ‘meta_key’ and “meta_value’.
["meta_query"]=> array(1) { [0]=> array(3) { ["meta_key"]=> string(14) "result-athlete" ["meta_value"]=> NULL