Forum Replies Created

Viewing 30 posts - 1 through 30 (of 228 total)
  • Author
    Posts
  • in reply to: using :before to add an icon and a link #1118726

    Hi Ismael,

    That’s the same code i originally tried but didn’t work…

    $cptlink = get_post_meta($post->ID, 'linkedinurl', true);
    $meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add} {$cptlink}</a></div><div class='slide-meta-del'>/</div>";

    The code you supplied does work but they look identical to me! The CF pulls through correctly.
    As always you’ve done first class support. 5 stars mate

    Thanks

    TJ

    in reply to: using :before to add an icon and a link #1118124

    I photoshopped it out so no one on here could read it. The issue isn’t because of the excerpt or content. I know what i want is possible because like i said i can get plain text to appear where i want. The problem is if i paste various pieces of code the out put breaks, so I must not be using the correct code.

    To add a CF in standard wordpress theme you use
    <?php echo get_post_meta($post->ID, 'Mood', true); ?>

    Pasting that into the postslider.php just returns errors

    Notice: Undefined variable: post in /config-templatebuilder/avia-shortcodes/postslider.php on line 575

    Notice: Trying to get property of non-object in config-templatebuilder/avia-shortcodes/postslider.php on line 575

    I’m not sure how to translate that first bit of code so it outputs the CF.

    Thanks

    TJ

    in reply to: using :before to add an icon and a link #1117806

    Hi,

    The post has both an excerpt and content, I just removed it for the purpose of the image. I can change the code and get some plain text showing but any php changes just echo the code to the page rather than pulling the customer field info. I’ll try $the_id and see what happens with that.

    The info is against a customer post type called staff rather than a standard post / page does that matter?

    Thanks

    TJ

    in reply to: using :before to add an icon and a link #1116039

    Hi all,

    I’ve only just got back to this after 7 months and I need some help.

    I know from Dude’s reply I’m in the right place and I’ve found the code that I need to tweak. This has been confirmed by sticking some text in there that does show in blog grid meta.

    Code to tweak

    if($show_meta && !empty($excerpt))
    					{
    						$meta  = "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add}</a><p>TEST</p></div><div class='slide-meta-del'>/</div>";
    						}
                            $markup = avia_markup_helper(array('context' => 'entry_time','echo'=>false, 'id'=>$the_id, 'custom_markup'=>$custom_markup));
    						$meta .= "<time class='slide-meta-time updated' $markup>" .get_the_time(get_option('date_format'), $the_id)."</time>";
    						$meta .= "</div>";
    						
    						if( strpos($blogstyle, 'elegant-blog') === false )
    						{
    							$output .= $meta;
    							$meta = "";
    						}

    Result

    Capture4587

    Nice one, stage one complete.

    Stage two is to get the custom field data to show where TEST is and this is where I’m coming unstuck.
    No matter which code I use the custom field data doens’t show. I’ve tried various formats of the code and none work.
    See examples below….

      if($show_meta && !empty($excerpt))
    					{
    						$meta  = "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    							$cptlink = get_post_meta( get_the_ID(), 'linkedinurl', true);
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add} {$cptlink}</a></div><div class='slide-meta-del'>/</div>";
    						}
     if($show_meta && !empty($excerpt))
    					{
    						$meta  = "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    							$cptlink = get_post_meta($post->ID, 'linkedinurl', true);
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add} {$cptlink}</a></div><div class='slide-meta-del'>/</div>";
    						}
     if($show_meta && !empty($excerpt))
    					{
    						$meta  = "<div class='slide-meta'>";
    						if ( $commentCount != "0" || comments_open($the_id) && $entry->post_type != 'portfolio')
    						{
    							$link_add = $commentCount === "0" ? "#respond" : "#comments";
    							$text_add = $commentCount === "1" ? __('Comment', 'avia_framework' ) : __('Comments', 'avia_framework' );
    							$meta .= "<div class='slide-meta-comments'><a href='{$link}{$link_add}'>{$commentCount} {$text_add} </a><?php echo get_post_meta($post->ID, 'linkedinurl', true); ?></div><div class='slide-meta-del'>/</div>";
    						}

    So the question is how can I get data from the custom field called ‘linkedinurl’ to show?
    The custom field is on a custom post type does that matter? A little help pointing me in the right direction would be super :)

    Thanks

    Tim

    in reply to: Different Menu on mobile #1113319

    Hi all,

    My main menu is a heavy customised Ubermenu with images, icons, description none of which look right on mobile. Yes i could use css to completely restyle the menu and hide things and show other things but a neater way would be to output a different menu on mobile. A simpler and more mobile friendly one with less menu items.

    The following code

    if ( wp_is_mobile() ) {
         wp_nav_menu( array(
      'theme_location' => 'mobile-menu'
    ) );
    }

    does half a job. It adds an extra menu above the header on mobile. I need to know where the call is made for the menu that appears in the buger menu so i can replace that.

    Thanks

    Tim

    in reply to: Different Menu on mobile #1109235

    Hi,

    That link works for displaying a different menu somewhere on the page, why didn’t they just use the sub-menu element?

    I want to change the mobile menu call so a different menu is displayed in reference to this (Purchase code hidden if logged out) “>post.

    Show my ubermenu unless on mobile then display another.

    Thanks

    Tim

    in reply to: Remove date from search engines results #1108288

    Hi,

    If you are just after the dates that appear on the search page and in the Ajax search you can hide them using css.

    .search .post-meta-infos {
        display: none!important;
    }

    That should hide the meta info on the search page only. It will remain on blogs and blog elements.

    .header_color .ajax_search_excerpt {
        display:none;
    }

    That will remove the info from the Ajax search

    In order to remove them from the site completely you’ll need to edit some of the php files (I’ll get back to you soon over which ones) you could just change the “published” date in the backend to make them appear newer.

    Hope that helps

    TJ

    • This reply was modified 1 month, 1 week ago by  tjswarbs78.
    in reply to: Remove white border from underneath Main Menu #1108287

    Hi,

    It would appear there is some padding on the header that is pushing the main content down.

    .html_header_top.html_header_sticky #top #wrap_all #main {
        padding-top: 159px;
    }

    Adding that closes the gap on all pages. It does slightly move the content on the main page (where there is no colored bar) up by about 4px
    The code can be added to the quick css panel.

    Hope that helps

    TJ

    in reply to: Iframe in Enfold theme #1081396

    Hey,

    You can use a codeblock inside a colorsection to display an iframe.

    For example google maps or youtube videso can be embedded via an iframe this way.

    Embedded another website inside yours is not best practice and could be seen as phishing.
    Most sties will have X-Frame-Options: DENY as a HTTP response header that stops their site being embedded via an iframe.

    Hope that helps a little

    TJ

    in reply to: Google tracking via jQuery on a button #1081365

    Hey Ismael,

    I’ll remove the var statement part and see what happens.

    Is there a way to and more click functions to that code for other buttons? like below..

    function superpowers_script_event(){
    ?>
    <script>
    jQuery('.powers-btn-1 a').click(function(){	
    	ga('send', 'event', { eventCategory: 'superpowers', eventAction: 'download', eventLabel: 'joinedup', eventValue: 1});
    });
    jQuery('.powers-btn-2 a').click(function(){	
    	ga('send', 'event', { eventCategory: 'superpowers', eventAction: 'download', eventLabel: 'joinedup', eventValue: 1});
    });
    </script>
    <?php
    }
    add_action('wp_footer', 'superpowers_script_event');

    I only need to load one function then rather than multiple. Would the above work? Is there a neater way to do it?
    Again i know this is way off theme support so no rush :)

    Thanks

    TJ

    in reply to: using :before to add an icon and a link #1006136

    Boom!! Exactly what I needed :)

    Thanks

    TJ

    (can be closed)

    in reply to: using :before to add an icon and a link #1005967

    Hi,

    I’m currently using css to hide the meta info (see first post).
    What I then want to do is add in some info from a custom field, hence wanting to get at the php.

    I’m using the blog post element, rather than the team member section as I prefer the functionality. In the backend staff is a custom post type that the blog post element then pulls to the live page and displays in the grid layout. I have added a custom field to each “staff” which I then want to display in place of the meta info.

    Thanks

    TJ

    in reply to: using :before to add an icon and a link #1005668

    Hi Mike.

    Does that create the look on the live page or just the look and function of the element on the AviaBuilder canvas?

    For example in the loop-index.php you can change the code

    echo $title;
    				
                    echo "<span class='post-meta-infos'>";
                    
                    echo "<time class='date-container minor-meta updated' >".get_the_time(get_option('date_format'))."</time>";
                    echo "<span class='text-sep text-sep-date'>/</span>";
    
                        if ( get_comments_number() != "0" || comments_open() ){
    
                        echo "<span class='comment-container minor-meta'>";
                        comments_popup_link(  "0 ".__('Comments','avia_framework'),
                                              "1 ".__('Comment' ,'avia_framework'),
                                              "% ".__('Comments','avia_framework'),'comments-link',
                                              "".__('Comments Disabled','avia_framework'));
                        echo "</span>";
                        echo "<span class='text-sep text-sep-comment'>/</span>";
                        }

    to remove or add things to the meta info. That only seems to work on the single post page though. I can’t find anything similar in the blog.php mentioned.

    Thanks

    TJ

    in reply to: using :before to add an icon and a link #1004068

    Hi,
    Which php template is responsible for the blog post element? More specifically where is the php loop that controls the meta info? Currently it looks for post count and date of a post. I can tweak that to show a Custom field instead once I know where it is.

    Thanks

    TJ

    EDIT.

    I have found that loop-index.php can be tweaked to replace meta info on a single post page.
    Still can’t find which php file outputs the blog post element.

    • This reply was modified 10 months, 2 weeks ago by  tjswarbs78.
    in reply to: Find unimported changes for child theme #1003233

    Hi,

    It doesn’t look like any external .css files have been used then linked to.
    It’s best practice to add any external resources to the header and none have been. They’d appear around line 14.

    If you right click and go to view source… all that crap at the top from line 33 to 97 are the various resources loading. They all look standard.

    If you go to line 117 there is some css there that looks like this

     #top #header_main > .container, #top #header_main > .container .main_menu  .av-main-nav > li > a, #top #header_main #menu-item-shop .cart_dropdown_link{ height:102px; line-height: 102px; }
     .html_top_nav_header .av-logo-container{ height:102px;  }
     .html_header_top.html_header_sticky #top #wrap_all #main{ padding-top:152px; } 

    Has that been copied over do you know?

    There also hasn’t been any css added to the custom.css file (line 91)

    Any clues / hints as to what looks different? That might help narrow things down

    Thanks

    TJ

    in reply to: Comments not displaying #1003217

    Hey,

    How very odd.
    Have you set comments to be moderated under “Discussion Settings”? (or via a plugin)
    It could be another setting in there maybe blocking them?

    Is it possible to post a link to the page in question?

    Thanks

    TJ

    in reply to: Apply CSS to full width submenu ONLY when it goes sticky #1003215

    Hey Scott.
    You are correct, there is no class change once the menu hits the top of the page. There is a position change from absolute to fixed which is done via .js

    You can find the avia.js file by going to appearance > editor.
    Make sure the “theme to edit” is the Enfold parent and scroll down until you see .js under the “Theme Files” tree.

    It can also be found via ftp at wp-content>themes>enfold>js
    The lines for the css change are 1349 to 1377

    The entire function for sticky sub menu starts at 1318 and ends at 1459

    Ways to make changes that persist after updates?

    Create a child theme and make change to avia.js in there or the functions.php

    Hope that help a little

    TJ

    Hi,
    Is it possible to post a link to the site question?
    I’ve helped a number of people with mixed / cross content issues and may be able to shed some light.

    Thanks

    TJ

    in reply to: using :before to add an icon and a link #1003175

    Don’t know why I didn’t think of this before…. I could use a Custom Field.
    How would I get the info in the Custom Field to replace the meta info in the Blog Post element on a specific page?

    I’ll have a play about but if someone comes up with an answer please post it :()

    Thanks

    TJ

    in reply to: Error on Google Map #1003137

    Hey there.

    Two errors are showing for your map.

    Capture1

    One saying “(Purchase code hidden if logged out) “>you have exceeded your request quota” and one saying “The API version is out of date

    Google have changed the way the APIs work recently so it could be it is mis-configured. The link above should help you out

    Hope that help

    TJ

    • This reply was modified 10 months, 2 weeks ago by  tjswarbs78.
    in reply to: Portfolio sort_by_cat button order #854989

    Hi,

    Thanks

    I’ll have a look and see if I can come up with anything, you can close this one off.

    Cheers

    TJ

    in reply to: Portfolio sort_by_cat button order #854466

    Hmmm,

    Do you know where the javascript that creates the sort_by_cat lives?

    Thanks

    Tim

    in reply to: Changing colours of Bold text & Linked text #854283

    Monring, Yes the code should be put in to the quick css section located under theme options > general styling

    Copy and paste below

    .main_color strong { color: #1e7fe8;}
    a {color:#C92605;}

    If that doesn’t do what you need or more changes are needed please come back

    Thanks

    TJ

    in reply to: Include php Code on Webpages #853860

    Hey,

    (Purchase code hidden if logged out) -to-speicfic-pages/” target=”_blank”>Maybe this can help?

    Thanks

    TJ

    in reply to: Hide SKU #853845

    Ah that is not good.

    Crashed as in site now wont load? can you post a link to site here?

    Can you access the ftp to remove the code from the functions.php?

    If you are unsure how to proceed leave your ftp / login details in the private content field below and an admin from here will be able to log in and help.

    Thanks

    TJ

    in reply to: Changing colours of Bold text & Linked text #853793

    Morning,

    .main_color strong { color: #1e7fe8;}

    will globally change all text using the <strong> tag to blue.

    a {color:#C92605;}

    will globally change ALL links to red.

    If you only want to target certain links you would have to apply a class to them and use css for example

    <a href="#" class="class-here">I'm a link</a>
    
    .class-here {color:#C92605;}

    Hope that helps

    TJ

    • This reply was modified 1 year, 9 months ago by  tjswarbs78.
    in reply to: Hide SKU #853788

    Morning,

    You can use the following to hide SKUs on a product page but keep them in the admin panel

    function tj_remove_product_page_sku( $enabled ) {
        if ( ! is_admin() && is_product() ) {
            return false;
        }
    
        return $enabled;
    }
    add_filter( 'wc_product_sku_enabled', 'tj_remove_product_page_sku' );

    Code should be placed in your theme / child functons.php

    Hope that helps

    TJ

    in reply to: Drop down z-index issue? #853517

    Hello,

    Try the following.

    div#search-form { z-index: 0;position:relative;}

    That div actually has a position of static causing it load in DOM over elements above it

    Hope that helps

    TJ

    in reply to: Problem in URL after scroll down arrow #848148

    You are welcome.

    The height and width values can be changed. I had to use those to get the logo to sit correctly.
    The left 47% can be changed to move the arrow left or right.

    Have a play with the figures until you get it just right

    Thanks

    TJ

    in reply to: Accessing source code to edit #848132

    Hi,

    I use this php to add tracking code straight in the header of certain pages. this code needs to be in the header.php before the </head> tag

    <?php if (is_page(xxx)) { ?>   
    <script>
    //tracking code here
    </script>
      <?php } ?>

    changing the xxx for the page id number.

    Do be careful when changing php files as mistakes can crash your site. You’ll then need ftp access to get in and remove the changes.

    Thanks

    TJ

Viewing 30 posts - 1 through 30 (of 228 total)