Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Favorites infavorites:mine
infavorites:1234
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with Search options user 105791

For questions about the server-side programming language that the WordPress core, plugins and themes are written in. Questions about using PHP outside a WordPress context are off-topic but might be asked on Stack Overflow.

0
votes
2answers
function form( $instance ) { This code is sitting → <p> <input class="checkbox" type="checkbox" <?php checked( $instance[ 'description_box' ], 'on' ); ?> id="<?php echo $this->get_field_id … ( 'description_box' ); ?>" name="<?php echo $this->get_field_name( 'description_box' ); ?>" /> <label for="<?php echo $this->get_field_id( 'description_box' ); ?>">Check whether to display description or …
asked Aug 3 '17 by The WP Novice
1
vote
2answers
write this one → <span class="class2" id="class3-<?php echo $random;?>"> </span> Like this → $output = '<span class="class2" id="class3-.$random."> </span>' or does this has some flaws? …
asked Sep 12 '17 by The WP Novice
1
vote
1answer
' === $template_options){ echo 'displaynone'; } } Class → .displaynone {display:none;} But when I am calling function it doesnt work here → <aside class="sidebar <?php some_function …
asked Nov 21 '17 by The WP Novice
0
votes
1answer
Suppose there is a div → <div class="only-single-page"> some code </div> How to make sure that this div is there only when the index.php is accessed for the Posts single pages. <?php If … is_single() { ?> <div class="only-single-page"> some code </div> <?php } ?> But it didn't worked. …
asked Jul 11 '17 by The WP Novice
0
votes
2answers
Can we count the WordPress loop and store it in a variable? <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?> <?php $post_id = get_the_ID(); ?> <?php get_template_part … ('content','home'); ?> some code to be executed <?php endwhile; ?> <?php endif; ?> what I want is that for every 5 posts fetched ceratin code should be executed(example newsletter) → That means …
asked Sep 23 '17 by The WP Novice
0
votes
0answers
A non wordpress PHP file has this kind of code: <form class="someclass" action="page-contact.php" method="post"> But when in WordPress it doesn’t work. suppose we are here(a WordPress page or a … ="<?php echo admin_url('admin-ajax.php'); ?>" In my case, the admin-ajax.php file will be the same template/page file where the swiftmailer code is there with SMTP settings to send an email. …
asked Feb 26 by The WP Novice
0
votes
1answer
This is the whole code actually → <script> jQuery.noConflict(); jQuery(document).ready(function() { jQuery('#mailchimp_submit-<?php echo … $random?>').click(function() { jQuery('#process-<?php echo $random?>').css('display','block'); var datastring = '&name=' + escape …
asked Sep 12 '17 by The WP Novice
1
vote
1answer
<?php the_content(); ?> When we use the above the content is published like this → <p>Content is published</p> If I want to later this HTML and instead of <p></p> I want that <h3></h3> should be there. Is that possible? …
asked May 19 '18 by The WP Novice
0
votes
0answers
<form action="<?php echo site_url() ?>/wp-admin/admin-ajax.php" method="POST" id="filter"> <?php if ( $terms = get_terms( 'category', 'orderby=name' ) ) : // to make it simple I use …
asked May 26 '18 by The WP Novice
0
votes
1answer
case of the WordPress, it should come from the meta - The URL that is saved in Oembed. Look at this image of the single.php backend → I tried something of this sort: <?php $url = esc_url … ( get_post_meta( get_the_ID(), 'video_oembed', 1 ) ); echo wp_oembed_get( $url ); ?> More precisely like this → <iframe width="560" height="315" src="<?php $url = esc_url( get_post_meta …
asked May 30 '18 by The WP Novice
0
votes
1answer
<body <?php body_class(); ?> > In header.php I have written the above code. But I want when this page template is in use: page-customer.php then body_customer class should go above. Is this possible through some hook? …
asked Sep 2 '18 by The WP Novice
0
votes
2answers
wp_enqueue_style( 'style', THEMEROOT . '/css/style.css' ); wp_enqueue_style( 'responsive', THEMEROOT . '/css/responsive.css' ); I am using the above method to enqueue stylesheet, but what I want is …
asked Oct 18 '17 by The WP Novice
0
votes
2answers
The code in question → <?php if ( has_post_thumbnail() ) {the_post_thumbnail();} ?> The generated output in browser is like this → <img width="1620" height="973" src="..../site04/wp-content … 1024w" sizes="(max-width: 1620px) 100vw, 1620px"> Anticipated result → I want that height should output as "auto" value. I tried this: <div class="pimg"> <?php if ( has_post_thumbnail() ) {the_post_thumbnail();} ?> </div> and its css: .pimg img {max-with:100%; height:auto;} …
asked Jan 4 '18 by The WP Novice
0
votes
0answers
Question → Just like we customize the default WordPress comment system in the front end how can we customize this for the gallery the way we want to look this in the front-end? Here it is mentioned …
asked Mar 16 '18 by The WP Novice
0
votes
1answer
When not in WordPress we can tell a script to load when the entire page has loaded like this : $(window).bind("load", function() { // code here }); But is this achievable through this function ( …
asked Jan 29 '18 by The WP Novice

15 30 50 per page