Forum Replies Created

Viewing 15 replies - 16 through 30 (of 69 total)
  • Lisa

    (@workingwebsites)

    Hi auroragordon,

    The easiest way is to hide the title through CSS.

    If you looked in the code, you would see something like:

    <div class=”post-4 page type-page status-publish hentry entry”>
    <article>
    <div class=”post-container”>
    <div class=”post-header”>
    <h1 class=”post-title”>Search Input Page</h1>
    </div>
    <div class=”post-content”>
    <p>Find event or tour here.</p>

    The ‘page’ class in the div indicates it’s a page. It’s a similar set up for posts, only it says ‘posts’ in the div.

    To hide your title for pages, not posts, you start with that div class.

    To add CSS in the Apex theme, go to:

    • Dashboard
    • Apparance
    • Customize
    • Custom CSS

    Then add the code to hide <div class=”post-header”>. It’ll be something like:

    .page .post-header{
        display: none;
    }

    Note: You could also use the following just to hide the title, however, it leaves a real gap on the page, which you probably don’t want

    .page h1.post-title{
        display: none;
    }
    Lisa

    (@workingwebsites)

    Hi blakeleyk,

    First of all, a quick big picture view of WordPress.
    It’s a content management system that stores its page content in a database.
    When it displays a page, it pulls the content of the page out of the database, checks to see what theme (style etc.) you are using and applies the style sheet etc. for your site.

    That means the content always stays the same, but the theme can change. It’s a beautiful thing!

    What that means to you is, all you need is a new theme, and there is no lack of them. Also, you don’t have to change any of your content, it’s already in there.

    Note: WordPress sites are different than conventional HTML sites where each page is a file. A WordPress site looks like it has a file per page,but technically it’s not. WordPress is different head space, but once you get the hang of it, it is easier than the HTML file set up.

    So, first step, select a theme and load it on your site. Don’t worry about the content, it looks after itself.

    If you already have a look in mind, find a template that is pretty close. You can tweak it after.
    See: https://codex.wordpress.org/Using_Themes

    Once you have the theme on your site, it may not be a perfect fit.
    Many themes allow you to change colours, fonts etc. Usually you can set fonts etc. in the Dashboard, under ‘Appearance’ -> ‘Customize’

    If the theme still isn’t quite right, use a Child Theme.
    Important! Though it’s tempting just to change the theme you have, don’t do it! Sooner or later that theme will be updated and it could wipe out all your changes. Child Themes are your friends.

    Child Theme’s are pretty straightforward, they really come down to 2 files. You can do a lot just by having your own style sheet, you may not need the other features.
    See: https://codex.wordpress.org/Child_Themes

    I hope this points you in the right direction.

    Lisa

    (@workingwebsites)

    Hi santiagoiefe,

    Oh, there’s always a way!

    A solution is to set up the two drop downs (Category and Posts) and have the Posts drop down populate through JavaScript and JQuery based on the Category selection.

    Below should point you in the right direction:

    1) Build a JSON array of posts and categories in javascript
    See: https://developer.wordpress.org/reference/functions/get_posts/

    See: http://www.w3schools.com/js/js_json.asp

    2) Get all your categories in the Category drop down box
    See: https://codex.wordpress.org/Function_Reference/get_the_category_list

    3) Set up a javascript function that fires when a category is selected in the Category drop down box.

    4) The function that fires will:
    a) Clear out the posts drop down box (so you don’t have any old options)
    See: https://api.jquery.com/empty/

    b) Build a new list by going through a JSON array of posts and categories.
    Try a ‘for in’ loop to go through all the posts.
    See: http://www.w3schools.com/js/js_loop_for.asp

    When it finds a match, add it to the posts drop down box.
    See: http://stackoverflow.com/questions/317095/how-do-i-add-options-to-a-dropdownlist-using-jquery

    Note: Although WordPress has JQuery loaded in it, there is some set-up that may be needed.

    See: https://developer.wordpress.org/reference/functions/wp_enqueue_script/
    Specifically: Default Scripts Included and Registered by WordPress

    Lisa

    (@workingwebsites)

    The tooltip/title is added through your theme.

    First step: Contact the support theme and ask them. They can probably give you the best official answer.
    http://docs.nordicmade.com/savoy/#shop-adding-products

    If that doesn’t work, you can change the file where the tooltip/title is located in your theme. Since you don’t want to change theme files, you should create a child theme.
    https://codex.wordpress.org/Child_Themes

    Once the child theme is set up, you would create the child theme file with the button in it.

    The file with the button, in WooCommerce is located at:
    /wp-content/plugins/woocommerce/templates/single-product/add-to-cart/variation-add-to-cart-button.php

    To change it within a theme, look for it in your parent theme. It’s probably something like:
    /woocommerce/templates/single-product/add-to-cart/variation-add-to-cart-button.php

    Copy that file into your child theme.

    Look for the submit button with the title in that code. Make your changes there.

    Lisa

    (@workingwebsites)

    Hi Mira,

    It may be your settings that is causing the problems. (Dashboard->Settings)

    Try comparing your settings in your first site (http://www.pernstejn-reality.cz/8) to the live site (http://clkhk.cz/)

    For example, in the Reading settings, for your first site you probably have a static page set as your home page. However, in your live site, it might be blog pages that are coming up.

    Also, check your Permalink settings. On your first site, you have ‘pretty links’, but it might be different on your live site.

    Lisa

    (@workingwebsites)

    Hello Ahmed,

    To get the most popular posts in each category, start with getting a list of categories.
    Then you will get the most popular posts for each category and finally, display them in a list.

    1) Get a list of categories
    The following will return an array of all the categories:

    $arCat = get_categories();

    See: https://developer.wordpress.org/reference/functions/get_categories/

    2) Get the most popular posts for each category.
    For this, create a function like below:

    function MostPopular($NumPosts, $Category){
    //Returns most popular posts.
    	$query = new WP_Query( array(
    		'meta_key' => 'post_views_count',
    		'orderby' => 'meta_value_num',
    		'posts_per_page' => $NumPosts,
    		 'cat' => $Category
    	) );
    
    	wp_reset_postdata();
    	return $query->posts;
    }

    See: http://codex.wordpress.org/Class_Reference/WP_Query

    3) Start building the list:

    $arCat = get_categories(); 	//Get array of all categories
    
    echo '<ul>';			//Start the list
    foreach ($arCat As $Category) {		// Go through each category
    	echo '<li>'.$Category->name;	// Print the category name
    		echo '<ul>';		// Start the posts list for each category
    		     $CatID = $Category->term_id;
    		     $arPopular = MostPopular(2, $CatID );	//Get posts for this category.  Only shows 2 of them
    
    		     foreach ($arPopular As $popPost) {	//Display posts
    			echo '<li>'
    			       .'<a href="'.get_permalink($popPost->ID).'">'.$popPost->post_title.'</a>'	// Get Permalink for post and display
    			     .'</li>';
    		     }
    		echo '</ul>';
    	echo '</li>';
    
    }
    echo '</ul>';

    See: https://developer.wordpress.org/reference/functions/get_categories/
    See: https://developer.wordpress.org/reference/functions/get_permalink/

    Lisa

    (@workingwebsites)

    Have a look at:
    https://wordpress.org/support/topic/how-to-remove-read-more-5?replies=8

    The key is to either update your version of The Box, or create a child theme and replace the thebox_excerpt(xxx); with the_content();

    Lisa

    (@workingwebsites)

    Ok, let’s try this:

    1) The ‘widget’ class has a top margin on 30px. Let’s make that smaller.
    You don’t want all the widgets to change, only the top one, so try adding the following to your style sheet:

    #subfooter .widget {
        margin-top: 0;
    }

    2) The ‘widget-first’ style has top margin of 10px, so make that smaller. Change from:

    .widget-first {
        margin-top: 10px;
    }

    To

    .widget-first {
        margin-top: 0;
    }

    3) Now the table with your items is above the menu. Change the table top-margin. I think this is done in your widget area?

    From
    margin-top: -11%;

    To:
    margin-top: 0;

    You may also want to change the margin-bottom as well.

    Lisa

    (@workingwebsites)

    You should be able to move the header to above the bar.

    Try editing the Theme Header file (header.php).
    Near the bottom you will see something like:

    <?php $header_image = get_header_image();
    			if ( ! empty( $header_image ) ) { ?>
    				<a class="header-image" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    					<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
    				</a>
    		<?php } // if ( ! empty( $header_image ) ) ?>

    This is what generates the header.
    Move it to where you want it (above the menu).
    Make sure you include all the PHP code in that block so errors don’t happen.

    The menu code is above header image and looks like:

    <nav id="site-navigation" class="main-navigation" role="navigation">
    			<button class="menu-toggle"><span class="icon-font icon-menu"></span></button>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    		</nav><!-- #site-navigation -->

    In the end, it will look something like:

    <?php $header_image = get_header_image();
    			if ( ! empty( $header_image ) ) { ?>
    				<a class="header-image" href="<?php echo esc_url( home_url( '/' ) ); ?>" title="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>" rel="home">
    					<img src="<?php header_image(); ?>" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
    				</a>
    		<?php } // if ( ! empty( $header_image ) ) ?>
    
    		<nav id="site-navigation" class="main-navigation" role="navigation">
    			<button class="menu-toggle"><span class="icon-font icon-menu"></span></button>
    			<?php wp_nav_menu( array( 'theme_location' => 'primary' ) ); ?>
    		</nav><!-- #site-navigation -->

    Note: You may want to move the social links bar as well. You can move it around the same way.

    Lisa

    (@workingwebsites)

    Hi Niko,

    It looks like you’re changing the theme’s files. I highly recommend setting up a child theme. It will make the process easier.
    See: https://codex.wordpress.org/Child_Themes

    As for the formatting, yes, I see there’s no new lines etc.

    In the content.php file of your child theme 😉 replace
    thebox_excerpt(xxx); with the_content();

    That will display all the formatted content on the page.
    See: https://developer.wordpress.org/reference/functions/the_content/

    If you want to use the excerpt, try the_excerpt();
    See: https://developer.wordpress.org/reference/functions/the_excerpt/

    Lisa

    (@workingwebsites)

    Lisa

    (@workingwebsites)

    Can you give a link where the excerpt pages are 500 and others are 200?

    Lisa

    (@workingwebsites)

    Hi Niko,

    First, can you supply a link to the actual site?
    I see the problem, but need to look at the code of the site to get a better idea of what’s going on. Thanks!

    Second, did the ‘text not formatted’ problem start when you removed the ‘Read More’ link?
    If so, how did you remove it? Was it done through the style sheet (CSS) or through coding the page?

    If it was done through the coding of the page, try and put it back, see if that re-formats the text properly.

    Removing the ‘Read More’ though CSS would be less invasive.
    In the stylesheet.css try:

    .more-link {
        display: none;
    }

    Third, the length of the excerpt.
    Right now it’s showing the first XX characters of the post. What you want is the full content.

    If you have ‘The Box Plus’ you can set it through the ‘Blog’ options.
    http://www.designlabthemes.com/the-box-documentation/#blog

    The Box Plus:
    http://www.designlabthemes.com/the-box-plus-wordpress-theme/

    Lisa

    (@workingwebsites)

    To clarify,

    You’ve set up a widget area, where the items are now.

    Next step, you want to move the widget to a different area on the page.

    Correct?

    Lisa

    (@workingwebsites)

    Is it the banner that says: ‘ENVIO GRATUITO a partir de …’ ?

    If so, it may be in a widget area.

    I think that widget area is called ‘widget-1’ or ‘widget-first’.

    Try looking in the ‘Widgets’ of your theme and see if you find it there.

    If it is in there, you can take it out and replace it with a text box.

    See: https://codex.wordpress.org/WordPress_Widgets#Using_Text_Widgets

Viewing 15 replies - 16 through 30 (of 69 total)