Buy Buttons

Hello - total newbie here.

My goal is to have buttons that look something along the lines of the below for my book that I will be selling through my site.

I am ok with your current buttons, I just can’t figure out how to change the font/color etc… to incorporate custom logos like this for Amazon/B&N/Kobu/Apple.

Few more questions:

  1. I incorporated the “About Me” element, but I can’t figure out how to get rid of the “admin” by my photo? Also, is there a way to wrap the text around the photo on the right of it and then below instead of starting it below and leaving all that space beside of the photo?

  2. On the top bar, is there a way to add the text “Follow” just to the left of the social follow buttons, and also add another set of social buttons for sharing on the left with the text “Share”?

  1. On the blog, how would I add the “about me” at the bottom of each post, along with my book and the purchase buttons I created on the main page? I can’t seem to add anything.

I think that’s all I have for now! Sorry for all the questions - fish out of water here!

Thanks -

Hi David,

Thanks for reaching out.

Those buttons aren’t text, they are images and you can only change it through image editing software like Photoshop given that you have the actual editable source of those images.

  1. It’s the display name which you can change by editing your profile in admin. Please go to Admin > Users > Your Profile, then change your first and last name. And last, change the Display name publicly as option other than admin.

As for the author description, have you added it outside the author structure? Because it should be wrapping just like on my end. Please provide the sample URL and login credentials in the secure note, it’s behind the under construction page.

  1. It’s only doable with Pro custom header, right now, X’s standard header is only limited to that feature. Please check this https://theme.co/apex/forum/t/pro-header-and-footer-builder-introduction/103. Still doable with X standard header but with custom development which we can’t provide here in the forum.

Though, if you’ll just add the "Follow:" text, then you can just add this CSS to Theme Options > CSS :slight_smile:

    .x-topbar .x-social-global:before {
     content: "Follow : "   ;
    }
  1. It should be similar to this, by adding this code to your child theme’s functions.php
add_action('x_after_view_global__content-the-content', 'view_about_me');

function view_about_me () { if ( ! is_singular('post') ) return false; ?>

<!--- Place the code that you created on your main page right under this line -->

<?php }

You have to replace the line <!--- Place the code that you created on your main page right under this line --> or add under it the code you have in your main page where book and purchase button is. Is it an embed code? And please check this about the child theme if you haven’t installed one https://theme.co/apex/forum/t/setup-how-to-setup-child-themes/57

Hope this helps.

Thanks for the quick reply Rad.

For the buy buttons, I was able to just snip them from the other website and save them as a picture and then upload into the button, I think it worked out well. Thanks for that idea.

  1. “About me” - looks like I was adding the text into the wrong spot. I put the text in the admin/profile section and that fixed it. I was also able to update my name from “Admin” to “David”. Although, I really wish there was a way to get rid of the bold “David” to the right of my picture. Would rather just introduce my name in the text. Is that possible to remove?

  2. Thanks for the code - that worked great. I might look into the pro custom header down the road sometime.

  3. I’ll install the child theme and try to implement your suggestions and see how I do. But quick question… how do I access the code for my book and purchase button’s are?

I’ll send you my login info incase you need to get in.

Hi David,

  1. What name do you prefer? I think that’s possible since you can choose whatever format you wish on that field, even the complete name which is why I recommend adding the first and last name so you could choose the combination as display name.

  2. Okay cool, you’re welcome :wink:

  3. I checked and they seem to be elements and not just embed code, for that, please create that section within the global block builder just like how you created them in the main page. Please check this https://theme.co/apex/forum/t/global-blocks/24723, then simply copy the global block shortcode and use it in the above code, example

add_action('x_after_view_global__content-the-content', 'view_about_me');

function view_about_me () { if ( ! is_singular('post') ) return false; 

echo do_shortcode('[cs_gb id=381]');

}

Hope this helps :slight_smile:

Thanks Rad -

As far as the name goes, I wanted to take it out completely so the “about me” text starts where the current big bold “David” is. Not sure if deleting the name entirely is an option?

Thanks for info on the global blocks, I will check it out and see how far I can get with my new programming skills. ha!

Dave

Hi Dave,

Would you mind providing a mockup design of how the name should be displayed? This should be okay and displayed

You can change it anytime, but I’m not still sure what you intend to display.

Thanks!

Rad - I think we are talking past each other. I am trying to not display the name at all. I would like that feature disabled. So the “Hi, I’m David…” starts by the top of the picture where the current bolded “David” starts.

Hi David,

Ah, you’re referring to the name from the description and not the name itself. Please add this CSS to Theme Ooptions > CSS

.x-author-box .h-author {
    display: none;
}

Hope this helps.

Thanks Rad - I will try that out.

One more easy one for you, when I activate the child theme and start adding the above recommendations to the functions.php file, do I always keep the child theme active or do I switch back to the normal x-theme?

Does it matter which theme I add CSS changes to like the author box modification above?

Same question when making the global blocks. Do I make them in the regular theme or the child theme and which theme do I run all the time?

Thanks -

Thanks

Hi David,

The child theme must always active if you wish your customization to be active as well, those are customization added to child theme functions.php and its templates. But activating the child theme will also activate the parent theme and its feature, it’s not just marked active in the admin.

The Theme Options isn’t specific to parent or child theme since it’s saved in database, so it doesn’t matter just as long as you place there.

Same for global block, it doesn’t matter if you’re on parent or child theme.

Thanks!

Great, thanks for all the help Rad. Great service you and your company are offering here, especially for new people like me. The Apex forum as been especially helpful. I try to go there and search for answers first before I opened a thread.

Glad we could always help, it’s our pleasure :slight_smile: and you’re most welcome!

Rad - two more for ya.

If I wanted to add social share at the bottom of each post (right below the post and above the about me and book/buy buttons), would I insert something into the global CSS like you have above? I have not yet tried to insert the code you provided as I am still working on the global blocks.

Thanks

HI David,

No, to achieve that, you need to add the code below in your child theme’s functions.php file

add_action('x_after_view_global__content-the-content', 'view_about_me');

function view_about_me () { if ( ! is_singular('post') ) return false; 

echo do_shortcode('[cs_gb id=381]');

}

Change [cs_gb id=381] with your global block shortcode.

For more information kindly refer to these links


Thanks

Thanks Paul for the reply, the resources, and the code. It worked perfectly. Have a nice evening.

David

You’re most welcome.

Hey guys -

I thought it was working but it doesn’t look like it’s bringing in the “about me” into the bottom of my blog post. It is however bringing in my global block. Here is the code I put in functions.php.

add_action(‘x_after_view_global__content-the-content’, ‘view_about_me’);

function view_about_me () { if ( ! is_singular(‘post’) ) return false;

echo do_shortcode(’[cs_gb id=212]’);

}

Thanks

Hello David,

Thanks for updating in!

I will place the code in a fully indented manner here:

add_action('x_after_view_global__content-the-content', 'view_about_me');

function view_about_me () { 
	if ( ! is_singular('post') ) {
		return false;
	}

	echo do_shortcode('[cs_gb id=212]');

}

This function code named as “view_about_me()” will append the post contents adding the global block at the bottom. Actually to make the code not so confusing, you can have it like this:

add_action('x_after_view_global__content-the-content', 'view_about_me');

function view_about_me () { 
	
	if ( is_singular('post') ) {
	
		echo do_shortcode('[cs_gb id=212]');
	
	}

}

I am not sure of you are expecting to display something else otherwise. Would you mind clarifying what you have in mind?

Thank you in advance.

Thanks for the update. I inserted the new code you provided and it still isn’t displaying the “about me” at the bottom of my post.

I would like at the bottom of each post to display the “about me” as shown on my home page, followed by the global block I created?

Thanks
David

Hey David,

You might be using an incorrect hook. Please have your code updated and use this instead:

add_action('x_after_the_content_end', 'view_about_me');

function view_about_me () { 
	
	if ( is_singular('post') ) {
	
		echo do_shortcode('[cs_gb id=212]');
	
	}

}

Please note that custom coding is outside the scope of our support. Issues that might arise from the use of custom code and further enhancements should be directed to a third party developer.

Please let us know if this works out for you.