Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all 8245 articles
Browse latest View live

snackycactus on "Getting post images and captions only!?"

$
0
0

Hi!
I'm trying to get only my post images and their captions to display both on my index and on my single pages. The images are working fine, but no-matter what I try, I'm not getting captions. Please help!!!!

This is what I have that works for the images:

<?php
   $attachments = get_children( array('post_parent' => get_the_ID(), 'post_type' => 'attachment', 'post_mime_type' => 'image','caption' => $attachment->post_excerpt) );
      foreach ( $attachments as $attachment_id => $attachment ) {
         echo wp_get_attachment_image($attachment_id, 'full' );
      }
?>

jh1639 on "Hide the Site Title on Storefront Theme?"

$
0
0

Hi everyone,

I'm using the Woocommerce Storefront theme, and I would like to know how I can modify it to hide the site title.

Here is a link to view a screenshot. What I'd like to remove is in red:
https://www.dropbox.com/s/20g8ilqy08s9z3p/site-title-ex.png?dl=0

The problem is, how can I remove the site title from the website, but keep it showing in the browser bar?

Thanks advance!

(BTW, I have a little experience editing code, but not a lot.)

sundev on "How can I put link that automatically show under every posts."

$
0
0

Hello everyone,

Please, how can I put a link, that automatically show up under every posts.

I just guess I might have to pop some PHP codes in the template.

You assistance is appreciated.

Thank you.

Loseless on "need help finding the right plugin"

$
0
0

Hi everybody!

I've been searching for a plugin to help me for months, but had no luck so far. I think it might be because I don't know how the plugin would be called and thus this thread.

http://psdolhao.net/comissao-politica

I would love a plugin that would present the information of this link, only in a more "presentable" way.

I've found a couple of options, but none worked so far.

Any help would be appreciated.

Thanks in advance!

bangkok108 on "rogue mails yahoo.fr"

$
0
0

this is the analysis wrote on a forum about the rogue mails i get:
"Someone is sending email from my website. The email is going to a gmail.com id and it appears to be from me. It looks like the mail is being sent from your yahoo mailbox, although I can't be sure.
The email bounced and was rejected by gmail for some reason. The email server at yahoo retries this many times, delaying a few days each time and as a result you receive the bounce message above regularly
It looks like spammers are registering with invalid email and the registration message bounces.
You need to figure out how the spammers are slipping past the plugin.
The jetpack plugin registration using a Wordpress Id lets users in because all they have to do is register at Wordpress and the plugin doesn't check them."

How to figure out how the spammers can slip past the plugin?
i removed Very simple Captcha form contact form, but now how to install a more efficient captcha? seems that WP accepts only Very simple captcha (red message in customize box). strange....
thanks for assisting
daniel

Sieve on "Layering text on top of video in wordpress"

$
0
0

Hi,

Is there a way to place text on top of video from the page editor. Ive built it in html to see how it would work but i cant get the same effect working with WordPress. we used positioning and the z-index to layer the text on top.

Any help will be greatly appreciated.

joloshop on "timestamp problem"

$
0
0

Hi I have a code which shows me the expire date of a taxonomy post

<?php $expire_date = clpr_get_expire_date($pid,'raw');

				if ( appthemes_days_between_dates( $expire_date ) > 0 ) {
					$time = clpr_get_expire_date($pid, 'time' );
					$time_left = human_time_diff( $time + ( 24*3600 ), current_time( 'timestamp' ) );

					$expires_text = sprintf( __( 'Läuft in %s ab', APP_TD ), $time_left );
				} else {
					$expires_text = __( 'Nur noch heute gültig', APP_TD );
				} ?><?php echo $expires_text  ?>

It works great however if there is no date set it also shows

else {
					$expires_text = __( 'Nur noch heute gültig', APP_TD );

however I would like to show another text in this case how do i accomplish this?

hotwebideas on "Programatically add support to a custom post type as a hook?"

$
0
0

I am using a plugin for WP Job Manager, but it does not support revisions. I need them for this type. Does anyone have code to add support for revisions?

Bruce


Andre Jutras on "Enqueue script from a Customizer setting"

$
0
0

In relation to using the masonry script in WordPress, I have it enqueued normally, but I'd like to load the script "only" when a theme setting is set from the Customizer. For example, my theme has several blog layout/styles, one is the masonry, so if I have the masonry option chosen, I want the script to show, otherwise not.

I'm seeing an error on pages when it's loaded but not needed as "Element Null".

Basically I need to keep the enqueue of this masonry in the functions.php, but have it so it loads only when my theme option is chosen.

Right now I have this:

if ( is_home() || is_archive() ) {
		wp_enqueue_script( 'masonry' );
		wp_enqueue_script( 'masonry-helper', get_template_directory_uri().'/js/masonry-helper.js', array('jquery'), '', true );
	}

souleye on "custom form"

$
0
0

I want a form that integrates a few features that I cannot see provided by any plugins. I'm using for booking time slots for photoshoots. in addition to the usual validation (name required, invalid email, date format), I'd like a clickable calendar flyout, a select for the different time slots and the possibility to send to another url for thank you page. any assistance will be appreciated. thanks. souleye

Scott Paterson on "View souce code of admin pages"

$
0
0

Hi,

I would like to be able to view the source code of admin pages while logged in. Instead when I try the source code, it is for the log in page (wp-login.php), not the page I am on.

I can kinda see the page code by using the Firefox inspector, but it has its own nesting problems.

Is there some kind of hack I can do so I can view the code of admin pages?

Thanks,
Scott

dash500 on "+WP_Query::rewind_post_to( many : int ) : bool?"

$
0
0

Just looking to optimize. Trying to grab stickies from the main loop. Searched the codex, DuckDuckGo and Google to no avail. Is there a better/recommend way to appropriate post slides? Or is there a WordPress function that does the following?

function rewind_posts_to( $many = 1 )
{
    global $wp_query;

    if ( !is_int( $many ) || 0 === $many ) {
        return false;
    }

    // ex: many = -361125
    if ( 0 > $many ) {
        $pos = abs( $many );

        // ex: post_count = 4, many = -361125
        if ( $pos > $wp_query->post_count ) {
            $pos %= $wp_query->post_count;
        }
    }
    // ex: many = 361125, current_post = 3
    else if ( $many > $wp_query->current_post ) {
        $pos = $wp_query->current_post - ($many % $wp_query->current_post);
    }
    // ex: many = 3, current_post = 3
    else {
        $pos = $wp_query->current_post - $many;
    }
    $wp_query->current_post = $pos;
    $wp_query->post = $wp_query->posts[$pos];

    return true;
}

Will keep it intact for now but would feel better if the core took control.

Thanks in advanced.

gorog25 on "Hacked by Ho3!en Mojazat"

$
0
0

Hello guys,
First of all I need to mention. I am a complete newbie with no knowledge about php or programing. So If anyone willing to help please be aware that I might do not know what you expect me to know. So maybe I need more detailed explanation.

So my site go4tec.eu was hacked by this hacker. I figured out to day when I see his massage on my screen.
"Hacked by Ho3!en Mojazat Hossien_Mojazat@yahoo.com THE END"

fortunately I recovered my site and my work has not been lost, but unfortunately all the security advice on WordPress.org and what I learned some online course is not working.

Do anyone know? How to hide wp-admin from my url or rename it? Is it possible? Do anyone heard about any application or code what allows admin assess from only a few specified IP?
Anyone heard about /vtigercrm/vtigerservice.php that script coursed the issue as far as I know.

Thanks in advance,

Ati74 on "WP-Query doesn´t work with variable"

$
0
0

Hi,

today i have a strange problem. It´s my first try with Wordpress & Ajax, but the most works... except a little part.
The Mainfunction is that after a few inputs in a form under the form some entries should be visible. With the Inputs i build a query like that

$table_plztour = $wpdb->prefix . "za_plztour";
	$zeit = $_POST['zeit'];
	$ortid = $_POST['ortid'];
	$lkw = wp_strip_all_tags($_POST['tournr']);
	$datum = $_POST['datum'];
	$plz = $wpdb->get_var ( "SELECT plz FROM $table_plztour WHERE id=$ortid" );
	$ort = $wpdb->get_var ( "SELECT ort FROM $table_plztour WHERE id=$ortid" );
	echo 'Die Zeit: '.$datum.' um '.$zeit.'<br>';
	echo 'Der Ort: '.$plz.' '.$ort . ' für Tour '.$lkw.'<br>';
	$meta_query = array();
	if (!empty($datum)) {
				$meta_query[] = array(
				'key' => '_lieferdatum',
				'value' => $datum,
				'compare' => '='
				);

			}

			if (!empty($lkw)) {
				$meta_query[] = array(
				'key' => '_tour',
				'value' => $lkw,
				'compare' => 'LIKE'
				);

			}

			$paged = ( get_query_var('paged') ) ? get_query_var('paged') : 1;
			$argus=array(
				'post_type' => 'liefertermin',
				'posts_per_page' => 10,
				'paged' => $paged,
				'meta_query' => $meta_query
			);
			$wp_query = new WP_Query($argus);

The Problem is this Part

if (!empty($lkw)) {
				$meta_query[] = array(
				'key' => '_tour',
				'value' => $lkw,
				'compare' => 'LIKE'
				);

			}

If i change $lkw to e.g. '502' everything works fine. If i used $lkw
the Query return no results! I do not know where the error is :(

Ati74

Paulino Michelazzo on "wp_deregister_script( 'comment-reply' ) give a notice error"

$
0
0

Hi people,

I'm trying to remove the comment-reply.min.js from my pages, leaving the load just in post pages. Unfortunately sometimes I can remove but I can't load again, sometimes I receive a notice message.

Remove on load

In the first time I used this function to drive the situation:

function clean_header(){
	if(!is_singular( 'post' ))
		wp_deregister_script( 'comment-reply' );
}
add_action('init','clean_header');

This approach doesn't work because it ignore the conditional and always remove the script. Also, if I try to load the script after it inside the header.php using something like wp_enqueue_script( 'comment-reply' ), nothing happens.

On the other hand, I can simply use wp_deregister_script( 'comment-reply' ). I have a function to unload the scripts (mostly jquery) to use different scripts in different directories. But, if I put this call inside of this function, I just receive a message like:

Notice: Undefined index: comment-reply in wp-includes/class.wp-scripts.php on line 201
Notice: Trying to get property of non-object in wp-includes/class.wp-scripts.php on line 201

I think that I forget something in the middle of the process but I can't imagine what. I've test a lot of different ideas but nothing happens.

Someone have a clue about it?

Thanks


Eoinb on "Password Protect page won't work with different url"

$
0
0

Hi
I can't get wordpresses password protect page - visibility working because in the general settings I need the sire url and web url different.

Is there a way around this.

Thanks in advance

Please Add Screenshots on "How to rename the "Published on" text in the post edit publish metabox"

MNSY on "Safest wordpress mode"

$
0
0

Hi all,
I have a WordPress as frontpage of my website.
The content and design of WordPress will not change and it will be fixed.
For WordPress security in MySQL, I gave only the "select" privilege to the MySQL user and in host, I changed the WordPress files and directories permission like as below:

find . -type f -exec chmod 444 {} +
find . -type d -exec chmod 511 {} +
chmod 400 wp-config.php

Does it provide the entire security without making any disturbance in WordPress usage? will it make the fully secure WordPress ?

sourtester on "Modifying AWPCP Place Ad dropdown categories"

$
0
0

Hello all,

I have a job site (CNC-Job.com) where Wishlist divides users into job seekers and job posters.

I was hoping to customize the AWPCP Place Ad job category dropdown so there was no chance of job seekers posting in job posters' categories and vice versa (they wouldn't see each other's categories listed in their own dropdowns).

I thought I was in the right area in editing this page-place-ad-details-step.tpl dropdown code.

<?php echo $dropdown->render( array( 'selected' => awpcp_array_data(
'ad_category', '', $form ), 'name' => 'ad_category' ) ); ?>

A few experiments haven't yielded anything yet. A few Fiverr people have scratched their heads and not responded.

If anyone has any experience with arrays and can offer a solution I'd appreciate it.

Thanks,
Lionel

GerryBot on "What's the right hook to use as a post is loading?"

$
0
0

I'm trying to write a rudimentary plugin that will evaluate posts as they load. If the post has less than a certain word count, and is older than x days, I want my function to kick in and:

a) Set up a 301 redirect to the post's parent category, and
b) delete the original post (so that it doesn't show up in Archive listings.

Can anyone recommend how to hook this into WordPress when the post is called?

Viewing all 8245 articles
Browse latest View live




Latest Images