ikaring
Forum Replies Created
-
Forum: Networking WordPress
In reply to: Multisite logo all linking to main siteHi franck_b.
Just set blog id of your main site instead ofget_current_blog_id().
Something like<?php echo get_home_url( 1 ); ?>, when main site id is 1.
If that is not what you need, you’d better set new thread for your case.Forum: Developing with WordPress
In reply to: Thumbnails with custom sizeYeeey, congrats!
Since correct value is stored when
echo $taxid;, it should be returned as is.There is a space after $taxid. Isn’t that the cause?
return $taxid ;Well, dont forget paren after aaaa,
function aaaaa(){And semi colon after
return $taxidAnd what is the returned value? NULL?
In Codex, it saids as below, though [“term_taxonomy_id”] seems to be integer.
Warning: string vs integer confusion! Field values, including term_id are returned in string format. Before further use, typecast numeric values to actual integers, otherwise WordPress will mix up term_ids and slugs which happen to have only numeric characters!
Try
var_dump( intval($taxid) );
or change $taxid to
$taxid = $term->term_id;What is the returned value and what is the desired value?
Pls check to see
var_dump( $term );beforereturn $taxID;.Just for checking: the 3rd arg of get_term_by, ‘someterm’, is a taxonomy name.
eg.
‘category’
‘post_tag’
‘your_custom_taxonomy’Forum: Developing with WordPress
In reply to: Thumbnails with custom sizeIt seems images are not generated.
Is there a thumbnail imagehttps://mydomain.com/wp-content/uploads/2017/04/wallhaven-444701-300x225.jpg?Please check that your hosting provider has the GD Image Library extension installed and enabled.
Forum: Developing with WordPress
In reply to: Thumbnails with custom sizeDo you see class attr and srcset attr in the img tag?
If not, you might have changed the output of the_post_thumbnail with filter hook or some sort.
If yes, I would check if there is a syntax error in functions.php before/after theadd_image_size.BTW, what if you call
the_post_thumbnail();without args?
Does it show thumbnail image?Forum: Developing with WordPress
In reply to: How and where does WP load jQuery?If you enqueue your scripts correctly, jQuery will not be loaded twice.
And you dont need to include your jQuery 1.11.1.
Have you checked if plugins are loading jQuery?Forum: Developing with WordPress
In reply to: hard_crop image thumbnailI dont know if it is possible to crop images as you described.
But it might be possible with css, no hard crop image.Suppose you have markup like:
<div class="container"><img src="yourimage.png" class="fitimage"></div>Then css may look like:
.container { width: 300px; height: 300px; display: table-cell; vertical-align: middle; text-align: center; background-color: #fff; } .fitimage { width: auto; height: auto; max-width: 100%; max-height: 100%; }Forum: Developing with WordPress
In reply to: How and where does WP load jQuery?Use wp_enqueue_script and wp_enqueue_style to load js and css, instead of calling them in header.php or footer.php.
For example:
function custom_scripts() { wp_enqueue_style( 'bootstrapstyle', get_template_directory_uri() . '/css/bootstrap.min.css' ); wp_enqueue_script( 'bootstrap-script', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), true ); } add_action('wp_enqueue_scripts', 'custom_scripts');https://developer.wordpress.org/reference/functions/wp_enqueue_script/
Forum: Fixing WordPress
In reply to: Centering Header ImageHi. Is it the pink circle?
Have you tried.site-branding { text-align: center; }?Forum: Fixing WordPress
In reply to: Jump link to different pagesHi.
If that js has a event trigger for after relocation, it might be possible to jump/scroll to the anchor by using location.hash or some sort, I guess.Forum: Developing with WordPress
In reply to: How to fix srcset issue?What is the value of
$attachment_id?
Is it set beforehand?