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

joehark on "how to change "quantity" in WP-eCommerce"

$
0
0

The "quantity" field in the WP-eCommerce shopping cart plugin is a ridiculous number of characters wide. The default is around 50 or more characters wide.

A sensible setting for almost any product would be no more than 5 characters wide (allowing for a single order of up to 99999 items). It makes no sense at all at its current width and that wide width breaks the calculation fields to its right.

Does anyone know where and how I can change that field's default width??


CraigScales on "Make Theme Show Full Post instead of Excerpts"

$
0
0

Hi!

The Syntac theme I'm using won't allow a full post to show on the "blogs" page. My site is dev.craigscales.com.

Any ideas? My theme seems to be built differently than what most of the forums are saying should be the solution...

Thanks!

vikas4811 on "Hide cancel Membership Button In Paid Membership Pro"

$
0
0

Hi, i want to know how to hide the Cancel membership button for member for 1 year in Paid Membership Pro.
Thanks

jaspercat on "Function login footer basline image absolut bottom"

$
0
0

Hi any help with this welcome. Put simply I want to place a full width image at the base of my login form under the back to blog URL.

I have successfully achived this with the header using a div but cannot work out how to do it with the footer.

Login link:

https://www.jasperglobal.com/pottmac1997/

robertsmoto on "Revolution Slider hiding drop down menu"

$
0
0

The Revolution slider is hiding my drop down menu "For the Cause" theme. How can I fix this?

derfritz on "Redirect user after login if user_email is empty"

$
0
0

Dear Forum,

at my site i will have several newly created users after a cvs import with no stored email-address. I want to redirect users without email-address after login to a site for data completion, users with an email-address should not be redirected (or be redirected to the main page).

After some research I tried to add this piece of code to my functions.php:

//User-Mail-Check
function function_check_mail_redirect() {
   $logincontrol = wp_get_current_user( $user_email );
   if ( $logincontrol == '' )  {
      //true: redirect
      wp_redirect( 'http://www.google.de', 302 ); exit;
   }
}
add_action('wp_login', 'function_check_mail_redirect', 10, 1);

But it did not work. Can anybody help me? What am i doing wrong?

Thanks a lot!

Rick on "Where to put code....functions.php or wp_admin editor for theme"

$
0
0

Over the years, we have added a lot of custom code to functions.php to modify our theme. I've never loved having to tinker with functions.php, because a single typo can bring down the whole site (and modifying via FTP is a bit of a hassle).

We run the Genesis theme, which recently added a nice admin screen to add code to wp_head(); there is also a plug-in that gives access to other wp hooks via admin panel. It seems much easier to view/maintain via the admin screens (vs. FTP) and I also wonder whether it's somehow less risky that mucking around in functions.php.

Is there a best practice on whether this type of code should be put in the functions.php file or is it fine to maintain on the theme admin pages in wp_admin? When do we choose one location vs the other?

Lunatrick on "How to determine the number of entries in a field"

$
0
0

I'm sorry, I cannot think of a way to word this in a search to find what I want, and I am fairly remedial at php so this might be super basic knowledge. Basically, I'm looking to use the following to pull up an unordered list of results:

<?php if(get_field('prevention')): ?>
<ul>
<?php while(has_sub_field('prevention')): ?>
<li><?php the_sub_field('prevention_method'); ?></li>
	<?php endwhile; ?>
</ul>
<?php endif; ?>

But I need to alter it so that if the sub_field('prevention') only has 1 result, to just display:

<?php the_sub_field('prevention_method'); ?>

with no unordered list around it. There will always be at least 1 result because it is a required field. Is there a way to make this happen? I did not write this code, it was given to me this way so I would prefer to keep it as close to the intended format as possible!


andrewanucha on "Can you take code from one WP Theme - to create plugin to use on another theme?"

$
0
0

I want to know if I can take code from a specific theme (specifically Resume style user profiles) and transfer to another theme that lacks that particular feature - Is there a way to create a plugin with the code already or is something that would have to be developed from scratch?

Execuse the lack of terminology - I'm still learning, and I'm using wordpress sites for my business.

Thanks

theplastickid on "Can someone explain to me why this code is written the way it is"

$
0
0

This is not a question in relation to a problem I have, rather one of curiosity. I was researching a solution to show the name of a template file on the page for debugging purposes when I came across this post.

http://wordpress.stackexchange.com/questions/10537/get-name-of-the-current-template-file/10565#10565

The answer by t31os solved my problem however I am unsure what he is doing with the $echo = false statement. I understand how the rest of the function works but can someone explain to me what this $echo = false is doing and how it works?

Many thanks :)

function get_current_template( $echo = false ) {
    if( !isset( $GLOBALS['current_theme_template'] ) )
        return false;
    if( $echo )
        echo $GLOBALS['current_theme_template'];
    else
        return $GLOBALS['current_theme_template'];
}

mstudioIL on "long menus"

$
0
0

I have an idea about long menus.
I have 20 pages and want to show only 5 each time and have arrows to navigation to the next or perv item, can it be done?

Coolcash4live on "How to replace comment URL field with PHONE Number of commenters"

$
0
0

Good morning leaders,

I've been reading all over the web for more than four hours but all the tutorials does not address a NEWBIE what to put into the functions.php and where "specifically" to put it; beginning or at the end of the page.

My challenge is: my website is http://www.allianceinmotionnigeria.com/blog and I want to make sure that all comments that is submitted on the website collects these data:

1. Full Name
2. Email (not compulsory for commenting as against the default rules by Wordpress)
3. Phone (HIGHLY REQUIRED for commenting)
4. Location
5. Comment

I'd be very glad if someone could just help me with the right code to input into the functions.php that will render these features.

NB: I have added a hook to unset 'URL' function before if you check the site. Kindly let me know if I should remove this entirely.

Please help me and I will be very grateful for your help in this community.

daniish on "What's wrong with this conditional statement"

$
0
0

Hello,

I am using a custom post type called 'artists' to display a profile of them. As part of this i wish to display a number of pictures related to each artist profile and for this i am using the 'Metaslider' plugin.

I have updated content-artist.php with the following IF/ELSE IF/ELSE loop:

<div align=center>
		<?php
			if ( 'artist' == get_post_type( (is_single( 'Tereska Shepherd - Watercolour' ) ) ) ) { // custom post title
			echo do_shortcode("[metaslider id=3944]");
			}
			elseif ( 'artist' == get_post_type( (is_single( 'Alison Holt - Embroidery' ) ) ) ) { // custom post title
			echo do_shortcode("[metaslider id=3945]");
			}
			else {

			}
		?>
		</div>

Currently, Metaslider id=3944 displays on both artist profiles, so i'm guessing there might be something wrong with the above code. Can anyone suggest what might be wrong?

Many thanks

Philly_Website_Development on "Manually Adding Adobe Edge Animate 2014.1.1 to Wordpress"

$
0
0

I did this before and now I can not remember how to do it again. I need to added it to the theme without a plugin. I hope someone can help me fast.

rrabinllama on "Where to find the php code to change specific contents of a page ?"

$
0
0

I want to change some contents which are displayed in the home page. Please go through the site http://www.helpnepalrelief.org/ . Here, in the site you can see there are two posts under "recent blogs" where the content inside the paragraph of the post is incomplete and I want to change it. (i.e. how many letters are shown inside the paragraph).


dominik.szewior on "current_time - date in local language"

$
0
0

Hello, I'd like to display in my page current date, so I use the current_time() function and it works as it should, but I don't know how to force it to show day and month names in my local language just as the_date() function does.

How can I do this?

Thanks!

ericreinecke on "REST API posts pagination"

$
0
0

Hi all!
Hope this is the right place for this.

I'm using the REST API to fetch paginated posts, but I'm having some trouble using the meta.next_page from the response JSON to actually fetch the next page.

Using the WordPress.com Console, I first did a GET with the following URL:
/v1.1/sites/en.blog.wordpress.com/posts/?number=2

I'm provided the meta.next_page:
value=2015-05-26T16%3A00%3A13%2B00%3A00&id=30718

But I haven't had any success plugging this into the page_handle parameter like the docs say to use.

I'm sure I'm missing something simple, but I'm a little stuck.

Thanks!

-Eric

dzulkiewski on "Table Description"

$
0
0

What is the correct CSS code to center the table description? I cannot figure out the proper code for that specific part.The link below has the table I am struggling with. The header is centered, but the description is still aligned left.
http://http://miscaonline.net/awards/

longtran295 on "How to view different main menu in each resolution?"

$
0
0

I don't know much about php or coding, and it's just my idea. Hope someone could help me! I think we can solve it by steps:
- Find resolution value.(1)
- Find menu ID which we want to show in (1). (2)
- Assign (2) for main-menu ID value.
Maybe it's wrong or meaningless, but i think everybody can do better.

Day Blakely Donaldson on "How to take apart the post composer?"

$
0
0

I would like to rearrange the post composer (past the built-in "Screen Options"). I would like to change the sizes of some boxes, add some boxes, maybe add a search bar to the "Categories" and add more results for the "Most Used" category function.

I suspect the editor is built of several files located in various places in the WordPress folders, and I see that post-new is only part, because when you edit a published post, you get post.php. If someone is able, could you please direct me to the files and maybe even give a hint of the sections I would be looking for?

I expect to just make a second Post Composer, while keeping the original intact (so that I could keep free of problems with updates).

Thanks, JM

Viewing all 8245 articles
Browse latest View live




Latest Images